Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-66066 — CVE-2026-66066 (KindaRails2Shell) PoC - Rails Active Storage/libvips arbitrary file read to RCE; for authorized security testing | Kitploit
Tools/GitHubGitHub/hackspeak/cve-2026-66066
Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb SecurityPenetration TestingSecret Detection
GitHubhackspeak/cve-2026-66066

CVE-2026-66066

CVE-2026-66066 (KindaRails2Shell) PoC - Rails Active Storage/libvips arbitrary file read to RCE; for authorized security testing

21141 month agoNot yet reviewed
View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-66066 — KindaRails2Shell

Ruby on Rails Active Storage + libvips arbitrary file read → conditional remote code execution (RCE) PoC tool.

Single-file, Python 3.11+ pure standard library with zero dependencies, includes MAT/HDF5 hybrid payloads, a pure-Python PNG pixel decoder, offset reads, key recovery, RCE and scanning modes.

Vulnerability Summary

Rails trusts the client-reported content_type (direct upload endpoint), while libvips sniffs file magic bytes—the same file is treated as two different formats across the two layers. An attacker crafts a hybrid file whose "first 10 bytes of text claim MATLAB 5.0, bytes 124-125 version word declare MAT 7.3 (HDF5)", leverages the HDF5 External File List mechanism to read arbitrary server files (default /proc/self/environ), recovers SECRET_KEY_BASE, then forges signed variations to conditionally achieve command execution.

  • Vulnerability ID: CVE-2026-66066
  • CVSS v4: 9.5 (Critical), CWE-1188
  • Affected components: Rails Active Storage + libvips (vips processor)
  • Affected versions: < 7.2.3.2 / >= 8.0, < 8.0.5.1 / >= 8.1, < 8.1.3.1
  • Fixed versions: 7.2.3.2 / 8.0.5.1 / 8.1.3.1, and requires libvips >= 8.13

Usage

python3 kr2s.py <command> [options]
CommandDescription
checkUpload a blob to confirm the target file is readable (intrusive)
read <path>Recover a fixed-size prefix of the specified file (binary output)
secretsRecover process environment variables and Rails credential files (redacted by default; --show-full displays full values)
rceRecover secret_key_base and conditionally execute commands (--skb skips the environment read)
probeProbe untrusted loaders available to the target's libvips
scanMultithreaded passive/active scanning (--active uploads a malicious blob for canary reading)

General options: target URL / hostname / batch files, --entry, --proxy, custom paths, TLS options, timeouts, User-Agent, etc. See python3 kr2s.py --help for details.

Local Docker lab (reproduction)

cd lab
RAILS_VERSION=8.1.3 docker compose up --build

⚠️ Disclaimer

For security research, vulnerability validation, and defensive testing only. The read / check / scan --active / rce commands upload persistent blobs to the target and execute commands on it. Please run them in a disposable Docker lab and do not use them against unauthorized targets.

Attribution and References

  • Original tool: 0xsha/KindaRails2Shell (MIT); this repository is a distribution mirror
  • Ethiack analysis: https://ethiack.com/info-hub/research/kindarails2shell-rails-rce-cve-2026-66066
  • Official advisory: https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm
  • Official forensics tool: https://github.com/rails/rails-forensics-CVE-2026-66066
Download Tool