Read the docs
TI-2026-36946 Aliases CVE-2026-50187

Oh My Zsh: Arbitrary Code Execution in oh-my-zsh dotenv plugin via malicious .env files

Priority MEDIUM 41CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 1 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-94.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00539 45th percentileScored 2026-11-07
Fix Partial ohmyzsh (ohmyzsh): 2026-05-28Red Hat: 1 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ohmyzshohmyzshbefore 2026-05-282026-05-28Patch availableCNA
  • ohmyzsh Vendorohmyzsh Affected before 2026-05-28 Fixed in 2026-05-28 Patch available CNA

Remediation

  • Fix · CNA ohmyzsh (ohmyzsh) Fixed in 2026-05-28

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-50187

References

  • TI-2021-02701 OS Command Injection in ohmyzsh/ohmyzsh CVSS 3.1CRITICAL 9.8
  • TI-2021-02660 OS Command Injection in ohmyzsh/ohmyzsh CVSS 3.1CRITICAL 9.8
  • TI-2021-02659 OS Command Injection in ohmyzsh/ohmyzsh CVSS 3.1CRITICAL 9.8
  • TI-2021-02658 OS Command Injection in ohmyzsh/ohmyzsh CVSS 3.1HIGH 8.8
  • TI-2021-02841 OS Command Injection in ohmyzsh/ohmyzsh CVSS 3.1HIGH 7.5

Sources