CVE-2026-47211
Received Received - Intake

Arbitrary Code Execution in Ouroboros via Malicious .env File

Vulnerability report for CVE-2026-47211, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-03

Last updated on: 2026-08-03

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-03
Last Modified
2026-08-03
Generated
2026-08-04
AI Q&A
2026-08-03
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-426 The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Ouroboros is a runtime for AI coding agents that records actions and enforces user-defined policies. Prior to version 0.39.0, it loads the .env file from the current working directory. Attackers can exploit this by including a malicious script in a repository and setting environment variables like OUROBOROS_CLI_PATH to point to it. When users run Ouroboros commands, the malicious script executes instead of the intended CLI, leading to arbitrary code execution and potential system takeover.

Detection Guidance

Check for the presence of a .env file in directories where Ouroboros commands are run. Inspect the file for suspicious entries like OUROBOROS_CLI_PATH or OPENCODE_CLI_PATH pointing to unexpected scripts. Verify Ouroboros version is 0.39.0 or later.

Impact Analysis

If you clone a malicious repository and run Ouroboros commands in its directory, an attacker could execute arbitrary code on your system. This could allow them to take control of your machine, steal data, install malware, or perform other malicious actions.

Mitigation Strategies

Upgrade Ouroboros to version 0.39.0 or later. Avoid running Ouroboros commands in untrusted directories. Review .env files in project directories for malicious entries. Remove any suspicious CLI path variables.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-47211. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart