{"id":"CVE-2026-47211","published":"2026-08-03T20:01:03Z","modified":"2026-08-03T21:19:05Z","title":"Ouroboros: Remote Code Execution via Untrusted Project-Directory .env","vendor":"Q00","product":"ouroboros","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00192,"percentile":0.08989,"provenance":"source"},"cwes":[{"id":"CWE-426","name":"Untrusted Search Path"}],"references":[{"url":"https://github.com/Q00/ouroboros/security/advisories/GHSA-c4m7-2gwp-vw76","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/Q00/ouroboros/pull/1078","tags":["x_refsource_MISC"]},{"url":"https://github.com/Q00/ouroboros/commit/4e70b760b4eb157469b58645339ba831f6513d37","tags":["x_refsource_MISC"]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":1.8},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"q00","affectedVersions":[{"vendor":"Q00","product":"ouroboros","versions":["< 0.39.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-03T21:06:50.835317Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"ouroboros-ai","vulnerableRanges":["<0.39.0"],"patched":["0.39.0"],"from":["GHSA-c4m7-2gwp-vw76","PYSEC-2026-2857"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-52425","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-q00-ouroboros-cve-2026-47211","children":[{"from":"CVE-2026-47211","to":"CVE-2026-66065","relation":"incomplete-fix","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"The CVE-2026-47211 fix added _UNTRUSTED_ENV_DENYLIST to stop an untrusted project-directory .env from redirecting execution, but it did not account for all keys.","from":"CVE.org","in":"CVE-2026-66065"}]}]}}