Vulnerability · Published Aug 3, 2026 · Assigned by GitHub_M

CVE-2026-47211Ouroboros: Remote Code Execution via Untrusted Project-Directory .env

High 8.4

In plain English

A high-severity security flaw in ouroboros from Q00. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)8.4High
Exploit odds (30 days)0.2%top 91.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIouroboros-ai0.39.0GHSA-c4m7-2gwp-vw76
PyPIouroboros-ai0.39.0PYSEC-2026-2857

Affected products (as reported)

VendorProductVersions
Q00 ouroboros < 0.39.0

Weakness: CWE-426 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References