Rails patches critical Active Storage flaw with RCE potential

A Critical Flaw in Rails’ Active Storage Framework Exposes Servers to Remote Code Execution

A severe vulnerability has been discovered in the Active Storage framework, a crucial component of the popular Ruby web application framework Rails. The flaw, dubbed CVE-2026-66066, allows an unauthenticated attacker to read arbitrary files from a vulnerable Rails application and potentially escalate to remote code execution (RCE). This critical issue affects multiple versions of Rails, including those using Active Storage before 7.2.3.2, 8.0.x before 8.0.5.1, and 8.1.x before 8.1.3.1.

Active Storage is responsible for handling file uploads and attachments in Rails applications, a function that relies on image processing libraries such as libvips or ImageMagick to generate thumbnails from uploaded media. Unfortunately, the CVE-2026-66066 flaw is exploitable when using libvips, allowing an attacker to upload a specially crafted image that can read arbitrary files on the server. This capability becomes a significant threat if the server allows untrusted users to upload images, as it could enable attackers to access sensitive app files, including credentials for databases and other services.

The vulnerability’s impact is substantial due to its potential for RCE, which enables an attacker to execute arbitrary code on the vulnerable system. This situation raises concerns about the security of Rails applications, particularly those that rely heavily on Active Storage for handling file uploads. The risk is further amplified by the fact that public proof-of-concept exploits have already been made available, indicating a high likelihood of successful attacks in the near future.

To mitigate this vulnerability, the Rails team recommends upgrading to libvips 8.13 or later and rotating sensitive credentials such as the ‘secret_key_base’, database credentials, Active Storage service credentials, and any other secrets accessible to the application process. For systems running libvips 8.13 or later, administrators can temporarily disable the vulnerable functionality by setting a specific environment variable or using a recent version of ruby-vips.

While there is no workaround available for applications that use libvips before 8.13, users are advised to update their Rails versions as soon as possible to minimize exposure to this critical flaw. Security teams should also be aware that the vulnerability’s RCE potential makes it particularly concerning and may require immediate attention from administrators.

Ultimately, the discovery of CVE-2026-66066 serves as a reminder for developers and security professionals to stay vigilant about patching vulnerabilities in their applications and services. Regular updates and timely responses to security advisories are essential to preventing exploitation by malicious actors.


Source: Bleeping Computer — 2026-08-01