Ruby on Rails Vulnerability (CVE-2026-66066) Exploited in KindaRails2Shell Attack

www.news4hackers.com-ruby-on-rails-vulnerability-cve-2026-66066-exploited-in-kindarails2shell-attack-ruby-on-rails-vulnerability-cve-2026-66066-exploited-in-kindarails2shell-attack

A critical security flaw (CVE-2026-66066) in the Ruby on Rails framework has been identified, allowing attackers to access sensitive server data and execute arbitrary code through crafted file uploads.

Vulnerability Overview

The vulnerability, named KindaRails2Shell by researchers, exploits a specific configuration in Ruby on Rails’ image processing capabilities. It enables attackers to bypass security controls and gain unauthorized access to server resources by leveraging malicious file uploads.

Exploitation Mechanism

The flaw arises from the interaction between Rails’ Active Storage component and the libvips image processing library. Active Storage handles image uploads and generates thumbnails, relying on libvips for format conversion. However, libvips supports non-standard file types like MATLAB.mat, NIfTI, SVG, and PDF, which contain exploitable processing routines.

Affected Versions

The vulnerability impacts Rails 7.0 through 8.1, specifically versions prior to 7.2.3.2, 8.0.5.1, and 8.1.3.1. Rails 6.0.0 to 6.1.7.10 may also be affected if Active Storage is configured outside default settings.

Mitigation and Fixes

A fix was released on July 29, 2026, with updated versions of Rails 7.2.3.2, 8.0.5.1, and 8.1.3.1. Users are advised to upgrade to these versions, update libvips to version 8.13 or later, and rotate sensitive credentials such as master keys and database access tokens.

Patch Recommendations

For systems with libvips 8.13 or newer, setting the VIPS_BLOCK_UNTRUSTED environment variable can disable unsafe operations without upgrading Rails. Security firm Akamai has deployed web application firewall (WAF) rules to detect and block exploit attempts.

Security Implications

The flaw highlights risks associated with default configurations in widely used frameworks. Organizations are urged to review Rails implementations, apply patches promptly, and conduct security audits to identify potential exposures.

“The availability of proof-of-concept code underscores the urgency of mitigation,” according to security experts.

Additional Information

The Rails team has provided tools to assess system exposure, including forensic checks for unauthorized access and data exfiltration. No confirmed exploits in the wild have been reported as of now.


Blog Image

About Author

en_USEnglish