---
id: CVE-2026-50187
title: Oh My Zsh is a community-driven framework for managing Zsh configuration
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 .en…
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-94
  - CWE-78
published: '2026-08-18'
updated: '2026-09-18'
sourceUpdated: '2026-09-18T20:05:53.723'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-50187'
references:
  - url: >-
      https://github.com/ohmyzsh/ohmyzsh/commit/d170d18746bb06db7b2fc97b67e281597a3fc152
    label: security-advisories@github.com
  - url: 'https://github.com/ohmyzsh/ohmyzsh/pull/13778'
    label: security-advisories@github.com
  - url: 'https://github.com/ohmyzsh/ohmyzsh/security/advisories/GHSA-3rgh-p3mg-rjqg'
    label: security-advisories@github.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-50187.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-50187'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2517922'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-50187'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-50187'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
epss: 0.00539
epssPercentile: 0.42915
ingestedAt: '2026-09-18T20:51:25.627Z'
vendor: Red Hat
product: Red Hat Ansible Automation Platform 2
affected:
  - ansible_automation_platform 2
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · Important · affected: Red Hat Ansible Automation Platform 2 · no fix planned: Red Hat Ansible Automation Platform 2 · updated 2026-09-22 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-50187.json)
