
Cloud Vulnerability DB
コミュニティ主導の脆弱性データベース
CVE-2026-66066 is a critical arbitrary file read and potential remote code execution vulnerability in Ruby on Rails' Active Storage component, dubbed KindaRails2Shell. It affects Rails versions prior to 7.2.3.2, 8.0.0.beta1–8.0.5.1, and 8.1.0.beta1–8.1.3.1 when configured to use libvips for image processing and accepting uploads from untrusted users. The vulnerability was responsibly disclosed by researchers from Ethiack (0xacb, s3np41k1r1t0, castilho) and RyotaK from GMO Flatt Security Inc., with the advisory published on July 29–30, 2026. It carries a CVSS v3.1 score of 8.9 (High) and a CVSS v4.0 score of 9.5 (Critical) (GitHub Advisory, Feedly).
The root cause is an insecure default initialization (CWE-1188) combined with unrestricted file upload handling (CWE-434): Active Storage did not call Vips.block_untrusted(true) at boot, leaving libvips "unfuzzed" loaders and savers — operations marked unsafe for untrusted content — fully accessible. libvips categorizes certain loaders (e.g., those backed by ImageMagick, HDF5/MATLAB .mat files) as unfuzzed because they are not hardened against malicious input. An attacker crafts a file (e.g., a MATLAB .mat or HDF5 file disguised as an image) that, when processed by Active Storage's variant pipeline, triggers one of these unsafe libvips operations to read arbitrary files from the server filesystem. The fix, applied in commits 1c01bb5, 349e7a5, and d79b7f4, adds a new activestorage/vips.rb initializer that calls Vips.block_untrusted(true) at boot and enforces minimum versions of libvips ≥ 8.13 and ruby-vips ≥ 2.2.1 (GitHub Advisory, Rails Commit). A fully functional Python PoC (rails_vips_oast_poc.py) that constructs malicious HDF5/Marshal payloads and achieves RCE has been publicly released (PoC Repo).
A successful exploit allows an unauthenticated remote attacker to read arbitrary files accessible to the Rails process, including /proc/self/environ, config/master.key, config/credentials.yml.enc, and any environment variables — exposing secret_key_base, database credentials, cloud storage keys (S3/GCS/Azure), and third-party API tokens. Exposure of secret_key_base enables forging of signed cookies and session tokens, which can escalate to remote code execution via deserialization gadgets. Lateral movement to connected cloud services or databases is also possible if their credentials are present in the environment. The NVD SSVC assessment rates the technical impact as "total" (GitHub Advisory, Feedly).
A fully functional, publicly available Python PoC exploit (rails_vips_oast_poc.py) exists that constructs malicious HDF5/Marshal payloads, uploads them to a target Rails application, and achieves RCE — with documented output confirming ARBITRARY_ENV_READ_RESULT=CONFIRMED (PoC Repo). A Metasploit module has also been reported as available (GBHackers). The NVD SSVC marks exploitation status as "poc" and the attack as "automatable." The EPSS score is approximately 0.0177 (1.77%), and as of the report date there is no confirmed in-the-wild exploitation or CISA KEV listing. Ethiack estimated over 500,000 websites were potentially exposed (Cybersecurity Insiders).
config.active_storage.variant_processor = :vips) that accept image uploads from unauthenticated or untrusted users. Use Shodan/Censys to find internet-facing Rails apps, or check Gemfile.lock for ruby-vips and activestorage versions below the patched thresholds.rails_vips_oast_poc.py), construct a crafted file (e.g., a MATLAB .mat / HDF5 file) that, when processed by libvips's unfuzzed loader, triggers a file-read operation targeting a sensitive path such as /proc/self/environ or config/master.key.secret_key_base, credentials, and tokens.secret_key_base to forge a malicious signed Rails session cookie containing a serialized Ruby object (Marshal gadget chain), submit it to the application, and achieve remote code execution upon deserialization (GitHub Advisory, PoC Repo, Rapid7 ETR)./rails/active_storage/direct_uploads, /rails/active_storage/blobs) with non-standard file types (e.g., .mat, HDF5, or files with mismatched MIME types); outbound DNS or HTTP requests to unknown external hosts from the Rails server process (OAST callbacks)..mat, HDF5, or other non-image files in Active Storage blob storage directories; forensic artifacts detectable by the Rails forensics toolkit (lib/crafted_mat_file.rb header signatures) (Rails Forensics).Vips::Error exceptions during image variant processing; Active Storage logs with blob IDs corresponding to non-image MIME types being processed as variants; access log entries showing variant generation requests for recently uploaded blobs from unauthenticated sessions.curl, wget, bash, ruby) following image upload and variant generation events.Primary remediation: Upgrade activestorage (and the full Rails stack) to patched versions 7.2.3.2, 8.0.5.1, or 8.1.3.1, and simultaneously upgrade libvips to ≥ 8.13 and ruby-vips to ≥ 2.2.1 — both are now required minimums (GitHub Advisory, Rails Release).
Workarounds (if immediate patching is not possible):
VIPS_BLOCK_UNTRUSTED=1 before starting the Rails process (requires libvips ≥ 8.13).Vips.block_untrusted(true) in a Rails initializer (requires ruby-vips ≥ 2.2.1).ruby-vips from the Gemfile entirely if libvips is only used for image analysis and not variant generation.:mini_magick (config.active_storage.variant_processor = :mini_magick) to avoid libvips entirely.Post-exploitation: If compromise is suspected, rotate all secrets readable by the Rails process: secret_key_base, RAILS_MASTER_KEY, database credentials, and all third-party API tokens. Use the official forensics toolkit to determine exposure scope (Rails Forensics).
The Rails core team published the advisory on July 29–30, 2026, intentionally omitting full technical details until August 28, 2026, to allow administrators time to patch — however, a working PoC appeared on GitHub the same day the advisory was released (Duggan USA). Rapid7 published both an early threat report (ETR) and a full technical analysis, and Akamai, Fastly, Cloudflare (WAF rules), and Check Point all released coverage or detections within days (Rapid7 ETR, Akamai, Fastly). The vulnerability received significant community attention on Hacker News, Reddit's r/netsec, and Mastodon/Bluesky, with the KindaRails2Shell name coined by the Ethiack researchers who discovered the attack chain. BleepingComputer, The Hacker News, SecurityWeek, and Heise all covered the story, and the Canadian Centre for Cyber Security issued advisory AV26-767 (BleepingComputer, CCCS). A notable post-patch complication was documented: simply patching the gem was insufficient without also upgrading libvips to ≥ 8.13 (FastRuby Blog).
ソース: このレポートは AI を使用して生成されました
無料の脆弱性評価
9つのセキュリティドメインにわたるクラウドセキュリティプラクティスを評価して、リスクレベルをベンチマークし、防御のギャップを特定します。
パーソナライズされたデモを見る
"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"