CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-JV2H-4P9V-WF5W

GHSA-JV2H-4P9V-WF5W: Arbitrary Remote Code Execution via Incomplete Environment Denylist in Ouroboros AI

Alon Barad
Alon Barad
Software Engineer

Jun 19, 2026·6 min read·15 visits

Executive Summary (TL;DR)

Ouroboros AI is vulnerable to arbitrary remote code execution via untrusted environment variables and working directory configurations, allowing attackers to run arbitrary system commands by getting a user to execute Ouroboros inside a cloned repository.

An arbitrary Remote Code Execution (RCE) vulnerability exists in ouroboros-ai due to an incomplete fix for CVE-2026-47211. Ouroboros automatically loads environment configurations from local .env files located in the current working directory (CWD) of cloned repositories. Although a denylist (_UNTRUSTED_ENV_DENYLIST) was introduced in version 0.39.0 to filter out execution-routing environment variables, multiple critical configuration variables were omitted, enabling complete sandbox bypass and arbitrary system command execution.

Vulnerability Overview

The affected component is the environment loader and execution configuration parser of ouroboros-ai. This component automatically processes and loads local environment configuration parameters from files within the current working directory. This exposure is particularly critical during command-line execution when parsing code repositories.

The system configuration exposes a critical attack surface because the tool runs within user workspaces. When a user runs commands like ooo within a folder, the software auto-discovers and configures its environmental parameters relative to that localized directory. This trust model allows external repository objects to direct administrative behaviors.

The weakness belongs to CWE-426 (Untrusted Search Path) combined with CWE-15 (External Control of System or Configuration Setting). The vulnerability enables unauthenticated remote code execution. This bypass variant is possible due to incomplete boundary controls deployed in preceding hotfixes.

Root Cause Analysis

The architecture of ouroboros-ai automates environment staging by merging configuration variables from localized .env resource files in the current working directory. In version 0.39.0, an initial hotfix implemented a blocklist called _UNTRUSTED_ENV_DENYLIST to exclude explicit CLI execution paths. This initial filter blocked variables such as OUROBOROS_CLI_PATH to prevent immediate execution redirection.

However, this blocklist was structurally incomplete, leaving several downstream execution-controlling environment variables exposed to modification. Specifically, variables managing downstream configuration directories (CODEX_HOME, OPENCODE_CONFIG, OPENCODE_CONFIG_DIR, XDG_CONFIG_HOME) were not filtered. When Ouroboros starts, it spawns downstream processes that locate their configurations relative to these environment values.

Additionally, secondary execution-altering mechanisms, including OUROBOROS_MCP_CONFIG and OUROBOROS_PLUGIN_LOCKFILE, were left exposed. If these are redirected to directories managed by an attacker, arbitrary plugin execution blocks can be initiated during routine tasks. This omission invalidates the isolation goals of the trust boundary, enabling command hijacking without modifying primary CLI paths.

Furthermore, the Model Context Protocol (MCP) bridge featured a secondary zero-configuration vulnerability. If a directory named .ouroboros containing mcp_servers.yaml existed within the current working directory, the system performed automated discovery by parsing configuration definitions. This meant that simply executing the core program within an untrusted repository initiated a malicious execution bridge, even in the complete absence of a .env file.

Code Analysis and Comparative Diff

In version 0.39.0, the system defined _UNTRUSTED_ENV_DENYLIST in src/ouroboros/config/loader.py with an incomplete scope, omitting secondary path controls:

# Vulnerable implementation in 0.39.0
_UNTRUSTED_ENV_DENYLIST = frozenset(
    {
        "OUROBOROS_CLI_PATH",
        "OUROBOROS_CODEX_CLI_PATH",
        "OUROBOROS_COPILOT_CLI_PATH",
        "OUROBOROS_KIRO_CLI_PATH",
        "OUROBOROS_OPENCODE_CLI_PATH",
        "OUROBOROS_HERMES_CLI_PATH",
        "OUROBOROS_GOOSE_CLI_PATH",
        "OUROBOROS_GEMINI_CLI_PATH",
        "OPENCODE_CLI_PATH",
        "OUROBOROS_AGENT_RUNTIME",
        "OUROBOROS_RUNTIME",
        "OUROBOROS_LLM_BACKEND",
        "OUROBOROS_AGENT_PERMISSION_MODE",
        "OUROBOROS_LLM_PERMISSION_MODE",
        "OUROBOROS_OPENCODE_PERMISSION_MODE",
    }
)

The loader applied this list inside the environment parser. However, because keys like CODEX_HOME and OUROBOROS_MCP_CONFIG were missing, they bypassed the filter block and entered the active runtime context.

In version 0.42.1, the blocklist was expanded to cover these omissions, and the current working directory auto-discovery code path in the MCP bridge was removed. The application now requires explicit home-directory configuration or verified environment variables:

# Patched implementation in 0.42.1
_UNTRUSTED_ENV_DENYLIST = frozenset(
    {
        # Original Executable Overrides
        "OUROBOROS_CLI_PATH",
        "OUROBOROS_CODEX_CLI_PATH",
        # ...
        # Backend config-home roots
        "CODEX_HOME",
        "OPENCODE_CONFIG",
        "OPENCODE_CONFIG_DIR",
        "XDG_CONFIG_HOME",
        # MCP bridge / plugin execution roster
        "OUROBOROS_MCP_CONFIG",
        "OUROBOROS_PLUGIN_LOCKFILE",
        "OUROBOROS_PLUGIN_TRUST_ROOT",
        # SSRF guard toggle
        "OUROBOROS_ALLOW_LOCAL_TRANSPORT",
        # Instruction / capability roots
        "OUROBOROS_AGENTS_DIR",
        "COPILOT_CUSTOM_INSTRUCTIONS_DIRS",
        "OUROBOROS_RUNTIME_PROFILE",
        "OUROBOROS_TOOL_CAPABILITIES",
    }
)

> [!NOTE] > The auto-discovery function was also corrected by removing cwd=Path.cwd() inside create_bridge_from_env. The application now resolves configuration paths exclusively from trusted system levels.

Exploitation Methodology

An attack relies on a user performing standard terminal interactions within an untrusted repository path. The adversary crafts a multi-layered folder structure containing a custom .env pointing downstream paths toward a controlled target. In addition, they supply a simulated local configuration structure in a hidden directory.

For example, configuring CODEX_HOME redirects the downstream agent execution cycle. When the core application calls the CLI interface, it inherits the configured CODEX_HOME variable, resolving files inside the malicious repository directory. The application subsequently initializes settings defined in .evil/config.toml rather than system-wide structures.

This malicious configuration file instructs the system to register custom servers with execution arguments. When execution flows reach these hooks, the tool initiates the command line arguments without prompting the operator. This execution bypasses user confirmation screens, initiating commands directly through Python's execution environment.

Technical Impact and Consequences

The impact of this vulnerability is complete compromise of the execution context hosting the ouroboros-ai package. Since many deployments are evaluated by local developers, software engineers, or automation routines, commands execute with the security permissions of the logged-in host user. An attacker can execute arbitrary commands, download secondary payloads, and persist on the client system.

Furthermore, because Ouroboros handles security credentials, including API keys, tokens, and local development configurations, the compromise enables complete data extraction of all credentials accessible via environment storage. Compromise of these development hosts can quickly facilitate lateral movement across enterprise networks.

The CVSS v4.0 score of 8.8 (High/Critical) reflects the seriousness of the issue. While user interaction is a prerequisite, it requires only standard activities, such as traversing into a cloned folder and executing typical commands. This makes exploitation a low-complexity task with high likelihood.

Remediation and Security Hardening

The only comprehensive remediation is to upgrade ouroboros-ai to version 0.42.1 or higher. This update restricts automatic environment loading, expands the blocklist, and removes the current working directory auto-discovery code path from the MCP bridge.

If immediate updates are not feasible, you must enforce execution sandboxing. Never run Ouroboros utilities inside directories cloned from untrusted origins or shared file systems. Developers should clean environment structures and manually verify that no localized .env files or .ouroboros directories reside within their workspaces.

Organizations can also implement system-level security controls to block exploitation. Restricting execution parameters and establishing monitoring rules to detect unexpected process trees spawned from interpreter runtimes (such as Python spawning shell processes inside user folders) can help mitigate risks.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
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 Systems

Ouroboros AI systems utilizing command-line runtimes and local directory loading.

Affected Versions Detail

Product
Affected Versions
Fixed Version
ouroboros-ai
Q00
< 0.42.10.42.1
AttributeDetail
Vulnerability TypeCWE-426: Untrusted Search Path / CWE-15: External Control of System Configuration
Affected ComponentEnvironment Staging & MCP Bridge Configuration
Attack VectorNetwork / File system parsing
Exploit StatusProof of Concept (PoC) available
ImpactRemote Code Execution (RCE)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1574.009Hijack Execution Flow: Path Interconnection / Path Pollution
Persistence
CWE-426
Untrusted Search Path

The application resolves path-based configurations relative to the current working directory, which may be controlled by an adversary.

Known Exploits & Detection

GitHub Security AdvisoryPoC demonstrating RCE via CODEX_HOME redirection and custom config.toml files.

References & Sources

  • [1]GitHub Security Advisory GHSA-jv2h-4p9v-wf5w
  • [2]Ouroboros Source Repository
  • [3]Fix Pull Request 1078

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•5 minutes ago•CVE-2026-69248
6.9

CVE-2026-69248: Name Constraints Bypass via Wildcard SANs in Python cryptography

An improper certificate validation vulnerability (CWE-295) in the Rust-based X.509 verification engine of python-cryptography allows wildcard Subject Alternative Names (SANs) to bypass permitted Name Constraints. This enables an attacker to construct certificates that escape the restricted scope of a subordinate Certificate Authority (CA) and successfully authenticate against vulnerable client installations. The vulnerability is tracked as CVE-2026-69248 and GHSA-m2h6-j472-rp4c, with a CVSS v4.0 base score of 6.9.

Alon Barad
Alon Barad
1 views•6 min read
•about 1 hour ago•CVE-2026-69244
7.1

CVE-2026-69244: Heap Out-of-Bounds Read in aiohttp C-Parser Error Handling

A high-severity heap-based out-of-bounds (OOB) read vulnerability exists in the Cython-based HTTP response and request parser extension of aiohttp. When processing malformed HTTP traffic, the parser fails to properly handle raw C pointers returned by the underlying llhttp library during error-message construction. This triggers an uncontrolled strlen() call on non-null-terminated network buffers, which can result in a Denial of Service (DoS) via worker process crash or the exposure of adjacent heap memory inside exception messages.

Alon Barad
Alon Barad
1 views•7 min read
•about 2 hours ago•CVE-2026-69192
7.7

CVE-2026-69192: SSRF Bypass via Parser Differential (Octal vs Decimal) in ip-address JavaScript Library

CVE-2026-69192 is a critical parser differential vulnerability in the 'ip-address' JavaScript library (versions <= 10.3.0). The library parses IPv4 octets containing leading zeros as base-10 (decimal), whereas standard system resolvers and web environments parse them as base-8 (octal). This discrepancy allows remote attackers to bypass SSRF guards and route malicious requests to internal RFC 1918 networks.

Alon Barad
Alon Barad
7 views•6 min read
•about 3 hours ago•CVE-2026-69151
7.6

CVE-2026-69151: Stored Cross-Site Scripting (XSS) in Angular Compiler i18n Pipeline via Event-Handler Attributes

A high-severity security vulnerability has been identified within the Angular compiler's internationalization (i18n) metadata collection and translation pipeline. Angular implements strict defenses against client-side execution injection by validating standard attribute and property bindings. However, when parsing elements containing both i18n translation attributes and inline event-handler elements (such as `i18n-onerror`), the compiler failed to assert the safety of the target attribute. Consequently, compromised or untrusted localization translation source files can supply arbitrary JavaScript payloads that replace static event-handler bindings. This arbitrary code is compiled directly into the localized build bundle and executed dynamically by the web browser, bypassing runtime sanitization, security checks, and standard binding constraints.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 4 hours ago•CVE-2026-69153
6.3

CVE-2026-69153: Arbitrary File Read via Path Traversal in PostCSS

A directory traversal and arbitrary file read vulnerability exists in PostCSS due to an incomplete fix of CVE-2026-45623. When parsing a CSS file containing a sourceMappingURL comment with the 'from' parameter unset, path traversal and absolute path validations are bypassed, enabling attackers to read arbitrary local .map files.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 5 hours ago•CVE-2026-69152
7.5

CVE-2026-69152: Denial of Service via Resource Exhaustion in brace-expansion

CVE-2026-69152 is a high-severity Denial of Service (DoS) vulnerability in brace-expansion that allows remote, unauthenticated attackers to cause a process crash or infinite thread-blocking condition. The vulnerability stems from a complete mitigation bypass of the security checks implemented for CVE-2026-14257.

Alon Barad
Alon Barad
7 views•7 min read