Ouroboros: Remote Code Execution via Untrusted Project-Directory .env
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-426.
Summary
Ouroboros is a local-first runtime for AI coding agents that records their actions and applies user-defined policies to constrain behavior. In versions prior to 0.39.0, if a user clones a malicious repository and runs Ouroboros commands within that directory, it can lead to arbitrary code execution and potential system takeover. The vulnerability stems from Ouroboros loading the .env file from the current working directory. Execution-affecting environment variables such as OUROBOROS_CLI_PATH, OPENCODE_CLI_PATH, and other backend selectors are accepted directly from this local .env. An attacker can include a malicious script in the repository and point the CLI path variable to it (e.g., OUROBOROS_CLI_PATH=./malicious_script.sh). When the user executes a command like ouroboros init or any command that instantiates the adapter, the malicious script is executed instead of the intended CLI. This issue has been fixed in version 0.39.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Q00 | ouroboros | before 0.39.0 | 0.39.0 | Patch available | CNA |
| — | ouroboros-ai (PyPI) | before 0.39.0 | 0.39.0 | Patch available | GHSA-c4m7-2gwp-vw76 |
- ouroboros VendorQ00 Affected before 0.39.0 Fixed in 0.39.0 Patch available CNA
- ouroboros-ai (PyPI) Vendor— Affected before 0.39.0 Fixed in 0.39.0 Patch available GHSA-c4m7-2gwp-vw76
Remediation
- Fix · CNA ouroboros (Q00) Fixed in 0.39.0
- Fix · GHSA-c4m7-2gwp-vw76 ouroboros-ai (PyPI) Fixed in 0.39.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47211
- 2026-10-03 Alias added: GHSA-c4m7-2gwp-vw76
References
More Q00 vulnerabilities
- TI-2026-47042 Code injection in Q00 ouroboros CVSS 4.0HIGH 8.4
Sources
- CVE-2026-47211 · CVE Program
- CVE-2026-47211 · NVD
- FIRST EPSS
- GHSA-c4m7-2gwp-vw76 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences