GHSA-jv2h-4p9v-wf5w: ouroboros-ai Remote Code Execution Vulnerability
HIGHGHSA-jv2h-4p9v-wf5w is a HIGH remote code execution vulnerability (CWE-15: External Control of System or Configuration Setting) affecting ouroboros-ai libraries in the PyPI ecosystem. The issue involves incomplete fix of cve-2026-47211: untrusted project .env can still reach rce via omitted execution-routing keys. Remediation is available by upgrading affected packages to version 0.42.1.
GHSA-jv2h-4p9v-wf5w at a Glance
How to Fix GHSA-jv2h-4p9v-wf5w
To remediate this vulnerability, upgrade all affected ouroboros-ai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install ouroboros-ai>=0.42.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ouroboros-ai
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-jv2h-4p9v-wf5w, inspect your installed packages using pip:
pip show ouroboros-ai
Analyze the terminal output to locate any version of ouroboros-ai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.42.1), your application is affected.
Note: The pip show ouroboros-ai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-15: External Control of System or Configuration Setting, where one or more system settings or configuration elements can be externally controlled by a user. In ouroboros-ai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-jv2h-4p9v-wf5w Affected ouroboros-ai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ouroboros-ai
|
PyPI |
< 0.42.1
|
0.42.1
|
References
Frequently Asked Questions
What is GHSA-jv2h-4p9v-wf5w?
Which ouroboros-ai versions are affected?
What version fixes GHSA-jv2h-4p9v-wf5w?
Is ouroboros-ai affected?
What CWE is associated with GHSA-jv2h-4p9v-wf5w?
How can I check PyPI dependencies for GHSA-jv2h-4p9v-wf5w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jv2h-4p9v-wf5w",
"modified" : "2026-06-19T15:12:25Z",
"published" : "2026-06-19T15:12:25Z",
"aliases" : [ ],
"summary" : "ouroboros-ai: Incomplete fix of CVE-2026-47211: untrusted project .env can still reach RCE via omitted execution-routing keys",
"details" : "### Impact\nThe CVE-2026-47211 fix (0.39.0) added `_UNTRUSTED_ENV_DENYLIST` to stop an untrusted project-directory `.env` from redirecting execution. The denylist was incomplete — several execution-routing keys of the same RCE class were omitted, so a malicious cloned repo can still reach arbitrary command execution by shipping a `.env` (auto-loaded at import, no review step):\n\n- **Backend config-home roots** `CODEX_HOME`, `OPENCODE_CONFIG`, `OPENCODE_CONFIG_DIR`, `XDG_CONFIG_HOME`: a spawned vendor CLI resolves its config from these. `CODEX_HOME=./.evil` + committed `./.evil/config.toml` redirects the nested Codex agent to attacker config — `mcp_servers.<name>.command/args` (RCE) and `approval_policy=\"never\"` / `sandbox_mode=\"danger-full-access\"` (silent removal of the human approval gate). (reported by matte1782)\n- **MCP bridge / plugin execution roster** `OUROBOROS_MCP_CONFIG` (the YAML's server `command`/`args` are spawned via stdio_client — RCE), `OUROBOROS_PLUGIN_LOCKFILE`, `OUROBOROS_PLUGIN_TRUST_ROOT` (redirect the installed-plugin roster / trust root so `ooo <name>` dispatches into attacker code). (reported by hackkim)\n- **SSRF guard toggle** `OUROBOROS_ALLOW_LOCAL_TRANSPORT` (re-enables loopback/private MCP transport targets).\n- **Instruction / capability roots** `OUROBOROS_AGENTS_DIR`, `COPILOT_CUSTOM_INSTRUCTIONS_DIRS` (replace spawned sub-agent role prompts), `OUROBOROS_RUNTIME_PROFILE` (backend selector), `OUROBOROS_TOOL_CAPABILITIES` (override YAML can lower a tool's `approval_class`, weakening the approval gate).\n\nAdditionally, the MCP bridge auto-loaded `./.ouroboros/mcp_servers.yaml` from the working directory (`create_bridge_from_env(cwd=Path.cwd())`), so running `ooo` inside a malicious repo spawned the committed roster's `command` — RCE with no `.env` at all. (cwd-branch noted by hackkim)\n\n### Patches\nFixed in 0.42.1. All listed keys were added to `_UNTRUSTED_ENV_DENYLIST`; the cwd auto-discovery branch was removed (only the explicit `OUROBOROS_MCP_CONFIG` env var and `~/.ouroboros/mcp_servers.yaml` remain, both trusted). The regression suite now derives from the source denylist to prevent future drift.\n\n### Workarounds\nDo not run Ouroboros from an untrusted/cloned repository directory; remove any project-directory `.env` and `./.ouroboros/mcp_servers.yaml` before running.\n\n### Credit\nReported privately via coordinated disclosure by matte1782 and hackkim (https://github.com/hackkim).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ouroboros-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.42.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.42.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Q00/ouroboros/security/advisories/GHSA-jv2h-4p9v-wf5w"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Q00/ouroboros"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-15", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T15:12:25Z",
"nvd_published_at" : null
}
}