CVE-2026-47211 Ouroboros: Remote Code Execution via Untrusted Project-Directory .env
Attackers can execute arbitrary code by placing a malicious .env file in a cloned repository, tricking users into running the tool.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-47211?
CVE-2026-47211 is a high-severity code injection vulnerability in Q00 ouroboros, published on 3 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-426
Which versions are affected by CVE-2026-47211?
3 open source packages ship an affected version, including ouroboros-ai.
| Package | Affected | Fixed in |
|---|---|---|
ouroboros-ai PyPI | All versions | 0.39.0 |
ouroboros-ai PyPI | All versions | 0.39.0 |
ouroboros-ai PyPI | All versions | 0.39.0 |
How do I fix CVE-2026-47211?
Upgrade ouroboros-ai to 0.39.0 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-47211 being exploited?
There is no known exploitation of CVE-2026-47211 in the wild and no public exploit code.
Sources
Also known as GHSA-c4m7-2gwp-vw76, PYSEC-2026-2857.