CVE-2026-50187 json
Oh My Zsh: Arbitrary Code Execution in oh-my-zsh dotenv plugin via malicious .env files
published 5mo ago modified last mo. also EUVD-2026-60954 , GHSA-3rgh-p3mg-rjqg
Unreviewed: the maintainers' own advisory
Published by the maintainers on their GitHub repository ohmyzsh/ohmyzsh. GitHub has not reviewed it into the GitHub Advisory Database, so the affected packages and versions are the maintainers' word. Read the full advisory on GitHub.
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 45%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- github.com/ohmyzsh/ohmyzsh@d170d18 commit
- github.com/ohmyzsh/ohmyzsh#13778 pull request
Is CVE-2026-50187 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-50187 updated cvss 8.8
oh-my-zsh: Oh My Zsh: Arbitrary Code Execution via malicious .env files
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-27/ansible-devspaces-rhel9, ansible-automation-platform-tech-preview/ansible-devspaces-rhel9affected: workaround, no fix available
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2mo ago
Exploit prediction
0.54% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected products
- ohmyzsh ohmyzsh
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
Sources
- CVE List CVE-2026-50187
- NVD CVE-2026-50187
- Maintainer advisory GHSA-3rgh-p3mg-rjqg
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of ohmyzsh/ohmyzsh published their own advisory on GitHub. Reviewed sources take precedence over it.