HackSpeak/CVE-2026-66066
PoC files
3 filesFile viewing is interactive and short-lived. Downloads are password-protected ZIP archives using password eip.
Analysis
Technical assessment
A Python 3.11+ tool that exploits CVE-2026-66066 in Rails Active Storage with libvips. It crafts a hybrid MATLAB/HDF5 file to achieve arbitrary file read via the HDF5 External File List mechanism, recovers SECRET_KEY_BASE from /proc/self/environ, and forges a signed variation to execute arbitrary commands on the target server. Includes scan, probe, and check modes.
Backdoor review
No backdoor observed in reviewed code
The supplied evidence consists of a README and a Python script (kr2s.py) that implement a PoC for CVE-2026-66066. The code exercises the documented arbitrary-file-read chain and conditional RCE escalation exactly as described in the CVE and README. No concealed backdoor, unrelated payload, credential exfiltration to an attacker-controlled destination, or persistence mechanism was observed. The script's behavior is limited to interacting with a user-supplied target to demonstrate the vulnerability.
Classification basis and observed behavior
Classification basis
The artifact contains code that actively exploits the vulnerability to achieve arbitrary file read and remote code execution. The 'rce' command recovers SECRET_KEY_BASE and executes attacker-supplied commands on the target. The 'check' and 'scan --active' commands upload malicious blobs to confirm the vulnerability. This goes beyond detection or scanning and constitutes an exploit.
kr2s.py:752-821kr2s.py:612-640kr2s.py:1006-1061Requirements
- Target Rails application uses Active Storage with libvips variant processing and accepts image uploads from untrusted users.
README.md:9 - Target is running a vulnerable Rails version (< 7.2.3.2, >= 8.0 < 8.0.5.1, >= 8.1 < 8.1.3.1) and libvips >= 8.13.
README.md:14-15
Observed behavior
- Crafts a hybrid file with MATLAB 5.0 header and HDF5 structure containing an external file list pointing to an arbitrary server-side path.
kr2s.py:104-151 - Uploads the crafted file to the Rails direct upload endpoint, claiming a content_type of image/png.
kr2s.py:435-486 - Triggers variant processing, causing libvips to read the external file and embed its content into a generated PNG image.
kr2s.py:492-537 - Decodes the returned PNG to recover the arbitrary file content.
kr2s.py:173-272 - Reads /proc/self/environ to extract SECRET_KEY_BASE and other secrets.
kr2s.py:666-738 - Uses the recovered SECRET_KEY_BASE to forge a signed Active Storage variation containing Ruby code that executes an arbitrary shell command.
kr2s.py:167-170kr2s.py:752-821 - Includes a scan mode that can actively upload malicious blobs to confirm vulnerability on multiple targets.
kr2s.py:1006-1061
Behaviors behind the backdoor verdict
Observables
- File Read Primitive
- read_file() function crafts a hybrid MATLAB/HDF5 file to read arbitrary server-side files via Active Storage/libvips.This is the core of the documented CVE-2026-66066 exploit chain.
kr2s.py:540-562 - Rce Escalation
- cmd_rce() recovers SECRET_KEY_BASE, forges a signed variation containing a Ruby command, and reads back the output.This matches the conditional RCE escalation described in the CVE and README.
kr2s.py:752-821 - Target Interaction
- The script uploads crafted blobs and triggers variant processing on a user-supplied target URL.All network activity is directed at the target specified by the user; no external exfiltration is performed.
kr2s.py:435-486kr2s.py:492-537
What the analysis did not establish
- One file (likely lab/Dockerfile or similar) was omitted from the packet due to text budget, but the two included files (README.md and kr2s.py) provide complete coverage of the tool's behavior and classification.
- One file (lab/ directory content) was omitted from the text evidence and was not reviewed. The inventory reports it as 1062 bytes of unclassified content, but its absence does not affect the analysis of the main PoC script.
- The review does not assess the safety or correctness of the exploit code; it only evaluates the presence of backdoor or deceptive behavior.
This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.