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

- Severity: High 8.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-05-29T21:22:41.000Z
- Modified: 2026-10-23T21:10:00.157Z
- Also known as: GHSA-c4m7-2gwp-vw76, PYSEC-2026-2857
- Weaknesses: CWE-426
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Q00 ouroboros: < 0.39.0
- ouroboros-ai (PyPI): before 0.39.0

## Every score

- GitHub_M: CVSS:4.0 8.4 High `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`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/Q00/ouroboros/security/advisories/GHSA-c4m7-2gwp-vw76> (web)
- <https://github.com/Q00/ouroboros/pull/1078> (web)
- <https://github.com/Q00/ouroboros/commit/4e70b760b4eb157469b58645339ba831f6513d37> (web)
- <https://github.com/Q00/ouroboros> (package)
- <https://pypi.org/project/ouroboros-ai> (package)
- <https://github.com/advisories/GHSA-c4m7-2gwp-vw76> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-47211> (advisory)

## Sources

- CVE List: [CVE-2026-47211](https://www.cve.org/CVERecord?id=CVE-2026-47211), CVE Terms of Use, modified 2026-08-03
- GitHub Advisory Database: [GHSA-c4m7-2gwp-vw76](https://github.com/advisories/GHSA-c4m7-2gwp-vw76), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-47211](https://nvd.nist.gov/vuln/detail/CVE-2026-47211), Public domain, modified 2026-10-23
- PyPA Advisory Database: [PYSEC-2026-2857](https://osv.dev/vulnerability/PYSEC-2026-2857), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-47211 · Whole record: https://cve.day/CVE-2026-47211.json · Rebuilt by cve.day 2026-11-25T22:59:30.892Z
