Impact
The oh-my-zsh dotenv plugin sources the content of a .env file automatically after a change of directory into a folder containing such a file. If that file contains syntactically valid shell commands, they are executed with the current user’s privileges. This permits an attacker to execute arbitrary code on the account that runs the shell, without any interactive prompt if the environment variable that enables prompting is disabled or left unset. The weakness is a form of code injection, identified by CWE‑94.
Affected Systems
Oh My Zsh installations that include the dotenv plugin and are running any release prior to 2026‑05‑28 are impacted. The vulnerability is fixed in all versions released after that date.
Risk and Exploitability
The CVSS score of 8.8 indicates a high level of severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. The most likely attack vector is local: an attacker who can place or modify a .env file in a directory that a user will later enter can trigger execution of malicious commands. In shared or multi‑user environments, this could also be leveraged remotely if the attacker can influence the user’s working directory or supply a malicious .env file on a network share.
OpenCVE Enrichment