CVE-2026-0768 & CVE-2026-66066: AI Workflow and Rails Servers Under Active Attack — 360+ Intrusions Detected, Cloud Keys at Risk
Within 24 hours of the first public reports, attackers had racked up more than 360 exploitation attempts against CVE-2026-0768 in Langflow — an AI agent-building platform used by thousands of enterprises to orchestrate LLM workflows. Simultaneously, a second critical flaw — CVE-2026-66066, dubbed KindaRails2Shell — was being weaponised against Ruby on Rails applications, allowing unauthenticated attackers to steal the cryptographic master key that unlocks full remote code execution. Both campaigns share the same operational fingerprint: cloud-credential harvesting, active C2 infrastructure, and a disturbing focus on AI-related secrets including OpenAI API keys and AWS access credentials.
If your organisation runs Langflow for AI pipeline automation, or any Ruby on Rails application that accepts image uploads, the window to act is now. As of 1 September 2026, active exploitation is confirmed across canary systems in Singapore, the United Kingdom, and Israel.
📌 Key Takeaways
- CVE-2026-0768 (CVSS 9.8) — Unauthenticated RCE in Langflow ≤ 1.4.2; attackers are reading
/root/.cache/langflow/secret_key, OpenAI API tokens, and AWS credentials. - CVE-2026-66066 “KindaRails2Shell” (CVSS 9.5) — Arbitrary file-read in Rails Active Storage via a crafted MATLAB/HDF5 image upload; when SECRET_KEY_BASE is recovered, full RCE follows.
- VulnCheck recorded 50+ detections within hours of initial observation; that figure has since surpassed 360 as of Monday, 1 September.
- Attack traffic for CVE-2026-0768 originates from a single IP in France, with C2 communications to a host in Israel; CVE-2026-66066 exploitation targets include canary systems in Singapore, UK, and Israel.
- Patch Langflow to version 1.5.0+ and Rails to 7.2.3.2 / 8.0.5.1 / 8.1.3.1 immediately; consider blocking libvips image variant processing if upgrade is delayed.
- Both vulnerabilities are ideal targets for zero-trust segmentation — network isolation of AI infrastructure prevents lateral credential movement.
The Twin Threats: What Just Started Happening on Your Network
Modern enterprise networks are increasingly threaded with AI infrastructure — Langflow instances orchestrating RAG pipelines, vector database connectors, and LLM-backed chatbots. What makes this week’s exploitation wave particularly alarming is that attackers are not merely dropping cryptominers or backdoors. They are performing methodical reconnaissance for high-value cloud credentials: the OpenAI API keys that bill to your organisation’s account, the AWS access keys that open your S3 buckets and EC2 instances, and the local Langflow secret material that can be used to forge internal authentication tokens.
Researchers at VulnCheck who tracked the CVE-2026-0768 campaign describe a disciplined attacker probing SSH access logs, reading .bash_history file sizes to gauge administrator activity, and systematically enumerating cloud service environment variables. This is not opportunistic script-kiddie behaviour — it is targeted pre-ransomware reconnaissance that maps credentials before the main payload ever lands.
Simultaneously, the KindaRails2Shell campaign (CVE-2026-66066) exploits a subtle but devastating parser confusion in Rails Active Storage. Rather than brute-force exploits, the attackers rely on deep knowledge of how libvips, libmatio, and the HDF5 file specification interact — a complexity gap that went unnoticed since Rails 7.0 switched libvips to its default image processing backend.
CVE-2026-0768: Langflow’s Unauthenticated RCE Deep Dive
Langflow versions up to and including 1.4.2 expose a code validation endpoint (/api/v1/validate/code) that accepts user-supplied Python code and evaluates it server-side. The flaw, classified as CWE-94 (Code Injection), arises because the validation logic fails to properly sandbox or restrict the supplied code before execution — and because Langflow’s containerised deployments typically run as root. There is no authentication barrier on this endpoint in affected versions.
An attacker sending a crafted POST request can execute arbitrary Python in the context of the Langflow process. Once they have code execution, observed attack behaviour has included:
- Reading
/root/.cache/langflow/secret_key— Langflow’s local credential material - Dumping environment variables containing
OPENAI_API_KEY,AWS_ACCESS_KEY_ID, andAWS_SECRET_ACCESS_KEY - Checking
~/.bash_historyand SSH authorised-keys files to map administrator access paths - Establishing command-and-control (C2) connections to an adversary-controlled host in Israel
Notably, VulnCheck reports no public proof-of-concept exploit was known at the time of the observed attacks, suggesting that a private exploit was developed and weaponised before coordinated disclosure. The attack traffic has been traced to a single source IP in France — consistent with a relay or proxy node used by the threat actor.
| Attribute | CVE-2026-0768 (Langflow) | CVE-2026-66066 (Rails) |
|---|---|---|
| CVSS Score | 9.8 Critical | 9.5 Critical |
| Authentication Required | None | None |
| Attack Vector | Network | Network |
| Root Cause | CWE-94: Code Injection | CWE-1188: Insecure Default Init |
| Immediate Impact | Unauthenticated RCE as root | Arbitrary file read → RCE via key forgery |
| Secrets at Risk | OpenAI keys, AWS creds, SSH keys | SECRET_KEY_BASE, DB passwords, cloud tokens |
| Fix Version | Langflow 1.5.0+ | Rails 7.2.3.2 / 8.0.5.1 / 8.1.3.1 |
CVE-2026-66066 “KindaRails2Shell”: A Four-Layer Parser Confusion Attack
The Rails vulnerability is technically the more elegant of the two — and therefore the more dangerous from a detection standpoint. It exploits a fundamental mismatch in how Rails Active Storage, libvips, libmatio, and the HDF5 v7.3 container format each decide what a file “is.”
The attack works in three stages:
- Stage 1 — File Upload: An unauthenticated attacker uploads a crafted file containing both a MATLAB 5.0 header (which libvips’ sniffer accepts as a valid image type) and an HDF5 v7.3 container (which libmatio dispatches internally). The HDF5 container embeds an external dataset pointer that references an arbitrary file path on the server — for example,
/proc/self/environorconfig/credentials.yml.enc. - Stage 2 — Secret Extraction: When Active Storage generates an image variant (e.g., a thumbnail), libvips processes the “image” and the target file’s raw bytes are read as pixel data. The attacker retrieves those bytes from the rendered variant URL, recovering the application’s
SECRET_KEY_BASE. - Stage 3 — Forged Execution: Knowing
SECRET_KEY_BASE, the attacker derives Rails’ Active Storage verifier key and constructs a signed variation JSON containinginstance_eval. When Rails processes this signed blob, it executes the attacker’s Ruby code — achieving full remote code execution without ever touching the application’s authentication layer.
This attack chain is notable because each individual step looks like normal application behaviour: a file upload, a variant generation request, a signed URL. Security teams relying solely on signature-based WAF rules will likely miss it entirely. Akamai’s security research team has published detailed WAF bypass analysis, and active exploitation has already been observed per The Hacker News.
The India Angle: Why This Matters for NOC/SOC Teams in India
India’s enterprise sector has seen a rapid proliferation of AI-powered automation in 2026 — from customer service chatbots to document intelligence platforms to supply-chain analytics tools. A significant proportion of these deployments use Langflow as the orchestration layer, particularly in BFSI, manufacturing, and IT services verticals. At the same time, Rails powers a large share of India’s startup and SaaS ecosystem.
What makes these vulnerabilities especially dangerous for Indian organisations is the blast radius of a compromised OpenAI API key. Beyond the billing exposure (attackers routinely use stolen keys to run prompt-injection campaigns or sell access on dark markets), a compromised key can expose every conversation your Langflow instance has ever processed — including customer PII, internal documents ingested as RAG context, and proprietary business data. Indian organisations operating under DPDP Act 2023 compliance obligations must treat any unauthorised access to AI pipelines as a potential data breach requiring notification.
For context on how credential theft from developer toolchains can cascade into full supply-chain compromise, see our earlier coverage of the RUSTSEC-2026-0260 North Korean supply-chain attack on the Rust ecosystem. Similarly, the threat-actor techniques here echo the APT29 OAuth credential-theft campaign we documented earlier — persistent, credential-focused, and designed to pivot across connected cloud services.
What You Should Do: Sanjay Seth’s Defensive Playbook
Having spent three decades hardening enterprise networks — from FortiGate perimeter controls to zero-trust micro-segmentation — here is the priority order I recommend for Indian IT leaders responding to this campaign right now:
-
Patch immediately (P1 — within 24 hours):
- Langflow: Upgrade to version 1.5.0 or later. If you cannot upgrade immediately, block external access to the
/api/v1/validate/codeendpoint at your WAF or firewall. - Ruby on Rails: Upgrade to 7.2.3.2, 8.0.5.1, or 8.1.3.1 depending on your branch. If upgrading is not immediately feasible, disable libvips image variant processing by switching to ImageMagick or by blocking untrusted image uploads at the application layer.
- Langflow: Upgrade to version 1.5.0 or later. If you cannot upgrade immediately, block external access to the
-
Credential audit and rotation (P1 — same day): Any exposed Langflow instance must be treated as fully compromised. Rotate all OpenAI API keys, AWS access keys, database passwords, and any other secrets stored in the environment. Review CloudTrail / AWS Access Analyzer logs for unusual API activity. Revoke and regenerate Rails
SECRET_KEY_BASEand re-encrypt credentials. -
Network segmentation (P2 — this week): Your AI infrastructure — Langflow servers, vector databases, LLM gateway proxies — should never be directly reachable from the public internet or from untrusted internal segments. A zero-trust architecture with FortiGate application-aware policies or equivalent NGFW controls ensures that even an exploited AI service cannot reach cloud management APIs or lateral network resources.
-
Deploy WAF rules targeting the attack patterns: Block requests to
/api/v1/validate/codefrom untrusted sources. For Rails, Akamai and Cloudflare have published WAF signatures for CVE-2026-66066. Apply them. Additionally, consider blocking uploads of files with MATLAB (.mat) magic bytes to any endpoint that uses libvips for processing. -
Enable SIEM alerting for credential exfiltration indicators: Look for outbound connections from AI-tier hosts to non-standard ports and IPs. Flag any process on a Langflow host reading
/root/.cache/langflow/secret_keyor dumping environment variables. Baseline your AI hosts with an EDR agent — these environments are often overlooked in standard EDR rollouts. -
Check CISA KEV status: Langflow has been added to CISA’s Known Exploited Vulnerabilities catalog multiple times in 2026 — it is now a pattern, not an exception. Review your CISA KEV catalog subscription and ensure your vulnerability management programme auto-prioritises KEV entries with a 72-hour SLA for internet-facing assets.
Sources and Further Reading
For authoritative technical details on both vulnerabilities, consult:
- The Hacker News — Attackers Exploit Critical Langflow and Rails Flaws
- Rapid7 — KindaRails2Shell Technical Analysis (CVE-2026-66066)
- Akamai Security Research — Defending Against KindaRails2Shell
- GBHackers — Hackers Exploit Langflow RCE Flaw to Harvest OpenAI and AWS Credentials
- CISA Known Exploited Vulnerabilities Catalog
Frequently Asked Questions
Do I need to be running Langflow publicly exposed to be at risk from CVE-2026-0768?
Not necessarily. Many Langflow deployments are intended as “internal” services but are inadvertently accessible over corporate VPNs or via misconfigured cloud security groups. The validate endpoint is unauthenticated — any network path to port 7860 (Langflow’s default) is sufficient for exploitation. Even internal-only instances should be patched immediately, since an attacker who pivots past your perimeter (via phishing, for example) can exploit an unpatched Langflow server to harvest cloud credentials and move laterally across all connected cloud environments.
My Rails application uses ImageMagick, not libvips. Am I vulnerable to CVE-2026-66066?
No. CVE-2026-66066 specifically targets the libvips image processing path in Rails Active Storage. Rails 7.0 made libvips the default variant processor, so applications that migrated with framework defaults are at risk. Applications that explicitly configure config.active_storage.variant_processor = :mini_magick (ImageMagick) are not affected by this specific exploit chain — though you should still review your upload handling for other vulnerabilities. Check your config/application.rb or config/environments/*.rb to confirm your variant processor.
Should I treat any OpenAI or AWS keys from an exposed Langflow instance as compromised?
Yes, unconditionally. The attacker commands observed in VulnCheck’s honeypot data show systematic enumeration of environment variables for cloud credentials within seconds of gaining code execution. If your Langflow instance was running an unpatched version and was network-accessible, assume every secret in its environment was exfiltrated. Rotate all keys, enable CloudTrail and AWS Config drift detection, review API gateway logs for unexpected usage patterns, and check your OpenAI usage dashboard for anomalous token consumption. Treat this as a full incident response engagement, not just a patch-and-move-on situation.
How does zero-trust architecture limit the damage from these types of AI platform vulnerabilities?
A properly implemented zero-trust architecture — enforcing least-privilege network access, micro-segmentation, and continuous authentication — dramatically reduces the blast radius of an exploited AI service. Even if an attacker achieves RCE on a Langflow container, zero-trust policies prevent that container from initiating outbound connections to cloud management APIs, reaching adjacent database servers, or moving laterally to other AI services. FortiGate’s application-aware NGFW policies combined with SD-WAN identity-aware routing allow security teams to define exactly what traffic an AI workload tier is permitted to initiate — turning a potential full-environment breach into a contained, isolated incident. This is precisely the architectural model I help organisations implement across their hybrid cloud environments.
Is Your AI Infrastructure Protected?
The Langflow and Rails campaigns are a wake-up call: AI pipelines are now primary targets for credential harvesting and lateral movement. If you are unsure whether your Langflow deployments are patched, whether your Rails applications use libvips, or whether your network segmentation would contain a breach in your AI tier — let’s talk. I offer rapid security assessments tailored for Indian enterprises deploying AI, zero-trust architecture reviews, and FortiGate policy audits that can be completed in days, not months.