Decentralized & P2P

Mastodon v4.5.22 released to address critical Ruby security vulnerabilities

Key Takeaway

This security-focused update primarily updates the Ruby runtime in Docker images to mitigate multiple critical vulnerabilities.

Summary

The Mastodon development team has released version 4.5.22, a maintenance update focused on addressing security concerns within the platform's dependency stack. The release is specifically designed to mitigate multiple critical security issues by updating the Ruby runtime used in official Docker container images.

Administrators using Docker are urged to update immediately to ensure they are running the patched Ruby version. For those running non-Docker installations, the update requires ensuring that Ruby 3.4.13, 3.3.14, or newer is utilized to maintain a secure environment.

Security updates and dependency changes

  • Ruby Runtime: The default Ruby version has been updated in Docker images; non-Docker users must manually ensure they use Ruby 3.4.13, 3.3.14, or newer.
  • Dependency Patching: The release includes security updates for several key libraries, including puma, rails, sanitize, msgpack, and omniauth.
  • Storage Warning: Administrators utilizing OpenStack Swift for object storage are specifically advised to upgrade to a newer Mastodon version due to known security issues in existing dependencies.
  • Build Compatibility: The update notes a potential build failure for the charlock_holmes gem on systems using recent versions of gcc, suggesting a specific C++17 flag workaround.

Why it matters

This release is critical for Fediverse instance administrators to prevent exploitation of vulnerabilities in the underlying Ruby environment. It highlights the ongoing security challenges in maintaining decentralized social media platforms that rely on a complex web of upstream dependencies.

What to do

  • If you use Docker, update to Mastodon v4.5.22 and restart all Mastodon processes.
  • If you do not use Docker, ensure you are running Ruby 3.4.13, 3.3.14, or newer, then install dependencies with bundle install and yarn install --immutable, and restart all Mastodon processes.
  • If you use OpenStack Swift for object storage, upgrade to a newer Mastodon version as soon as possible.
  • If the charlock_holmes gem fails to build on your system, use BUNDLE_BUILD__CHARLOCK_HOLMES="--with-cxxflags=-std=c++17" bundle install.

Original reference: github.com →