Skip to content
Tech News
← Back to articles

Rails patches critical Active Storage flaw with RCE potential

read original more articles
Why This Matters

The critical Active Storage vulnerability in Rails poses a significant security risk, potentially allowing attackers to access sensitive files or execute remote code on affected servers. This highlights the importance of timely updates and security best practices for web applications built with Rails, especially those handling untrusted file uploads. Addressing this flaw is crucial for safeguarding user data and maintaining trust in web services.

Key Takeaways

A critical vulnerability in the Active Storage framework can allow an unauthenticated attacker to read arbitrary files from a Rails application, and potentially escalate to remote code execution (RCE).

Rails is a popular open-source web application framework written in Ruby for building websites and web apps. It uses the built-in Rails component Active Storage for handling file uploads and attachments.

Rails maintainers published an advisory about the CVE-2026-66066 flaw, which received a critical severity rating.

Active Storage may also generate image thumbnails from uploaded media using image processing libraries such as libvips or ImageMagick.

According to the security bulletin, CVE-2026-66066 is exploitable when libvips is used, allowing an attacker to upload a specially crafted image to a vulnerable application and read arbitrary files on the server.

Another prerequisite for the attack is that the server needs to allow image uploads from untrusted users.

If these requirements are met, an attacker may access app files, including the process environment, which typically contains ‘secret_key_base’ and credentials for databases, cloud storage, and other services.

CVE-2026-66066 impacts Active Storage before 7.2.3.2, 8.0.x before 8.0.5.1, and 8.1.x before 8.1.3.1.

Rails 6.x is only affected if Active Storage has been configured outside its defaults.

The Rails team recommends upgrading to libvips 8.13 or later and rotating the ‘secret_key_base’ (the Rails master key), database credentials, Active Storage service credentials, and any other secrets accessible to the application process.

... continue reading