Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker embeds shell payload in .env file
-
DeliveryVictim clones or downloads malicious repository
-
ExploitVictim cds into repository directory
-
ExecutionOh My Zsh dotenv plugin auto-sources .env as shell script
-
ImpactArbitrary commands execute as current user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the victim must have Oh My Zsh installed with the |
| Impact | The CVSS 3.1 score of 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) accurately reflects the full-compromise impact (C:H/I:H/A:H) and low attack complexity. The AV:N classification is defensible under the scenario where an attacker delivers the malicious |
| Exploit ScenarioDerived | An attacker publishes a malicious open-source project on GitHub with a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Arbitrary shell command execution in Oh My Zsh's dotenv plugin allows any syntactically valid Zsh command embedded in a .env file to run with the victim user's privileges when they cd into a directory containing that file. The plugin unconditionally sourced the .env file as a shell script rather than parsing it as a structured key-value store, meaning malicious git repositories, shared project directories, or downloaded archives could weaponize routine developer directory-navigation. Exploitation is silent when ZSH_DOTENV_PROMPT=false or when the user presses Enter at the default prompt without reviewing the file; no CISA KEV listing or public exploit code was identified at time of analysis.
RemediationAI
Update Oh My Zsh to any commit after 2026-05-28 by running omz update or git -C ~/.oh-my-zsh pull; the fix is confirmed present in commit d170d18746bb06db7b2fc97b67e281597a3fc152 (https://github.com/ohmyzsh/ohmyzsh/commit/d170d18746bb06db7b2fc97b67e281597a3fc152). No named semantic release version is available - the patched version is identified by commit date only, not independently confirmed as a tagged release. If immediate update is not feasible, disable the plugin entirely by removing dotenv from the plugins=(...) line in ~/.zshrc and restarting the shell; this eliminates the attack surface with no side effects beyond losing automatic .env loading. Do not rely on ZSH_DOTENV_PROMPT=true (the default confirmation prompt) as a security control: it does not prevent execution if the user presses Enter without reviewing the file contents. The GitHub Security Advisory is at https://github.com/ohmyzsh/ohmyzsh/security/advisories/GHSA-3rgh-p3mg-rjqg.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Oh My Zsh is a community-maintained framework for managing Zsh shell configuration, installed by millions of developers on macOS and Linux. The dotenv plugin (plugins/dotenv/dotenv.plugin.zsh) hooks into Zsh's chpwd directory-change event and calls Zsh's built-in source on any .env file found in the new working directory. Because source treats its argument as a full Zsh script, any valid shell construct - command substitution, network calls, file writes, persistence mechanisms - executes in the current shell context. This is a textbook CWE-94 (Code Injection) flaw: untrusted file content is passed to an interpreter without sanitization. The fix (commit d170d18746bb06db7b2fc97b67e281597a3fc152, PR #13778) replaces unconditional sourcing with the _parse_dotenv_content function, which enforces: a 10 MiB file size limit, pre-execution syntax validation via zsh -fn, rejection of command substitution ($(...) and backtick) constructs, a hardcoded forbidden-variable list covering NODE_OPTIONS, ZDOTDIR, LD_PRELOAD, LD_LIBRARY_PATH, GIT_DIR, GIT_SSH_COMMAND, and all Zsh special parameters, and strict KEY=VALUE-only parsing using the (Z:C:) Zsh flag. No CPE string was provided in the source data.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
AV:N reflects realistic delivery via git repository; UI:R captures required directory change; full shell execution as current user drives C/I/A:H with no scope change.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Oh My Zsh is a community-driven framework for managing Zsh configuration. Prior to 2026-05-28, the dotenv plugin in plugins/dotenv/dotenv.plugin.zsh passes ZSH_DOTENV_FILE to source after a directory change into a folder containing a .env file, allowing syntactically valid shell commands in the file to execute with the current account's privileges, including without a prompt when ZSH_DOTENV_PROMPT=false or after the default prompt accepts an empty Enter response. This issue is fixed in versions released after 2026-05-28.
Executive ViewAI
A code execution vulnerability in Oh My Zsh's dotenv plugin (CVSS 8.8) allows arbitrary commands embedded in .env files to execute with developer privileges when entering a directory. Development teams are at risk from malicious repositories and shared project archives, potentially compromising source code access and development environment integrity.
Disable the dotenv plugin completely via zsh configuration, or set ZSH_DOTENV_PROMPT=true to enforce user confirmation before sourcing .env files; deploy file-integrity monitoring on development machines to detect unauthorized .env file modifications; enforce code-review processes for any .env file changes; consider adopting dotenv CLI tools or structured environment variable management that does not execute configuration files as shell code.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-60954
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB