# CVE-2021-3725: OS Command Injection in ohmyzsh/ohmyzsh

- Severity: High 7.5 (CVSS:3.1, scored by @huntrdev) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.05%, higher than 65% of CVEs (2026-12-01)
- Published: 2021-11-30T09:30:14.000Z
- Modified: 2026-06-17T04:05:38.660Z
- Weaknesses: CWE-78, CWE-94
- Assigned by: @huntrdev

## Description

Vulnerability in dirhistory plugin Description: the widgets that go back and forward in the directory history, triggered by pressing Alt-Left and Alt-Right, use functions that unsafely execute eval on directory names. If you cd into a directory with a carefully-crafted name, then press Alt-Left, the system is subject to command injection. Impacted areas: - Functions pop_past and pop_future in dirhistory plugin.

(As written by CVE List.)

## Affected

- ohmyzsh ohmyzsh/ohmyzsh: from unspecified before 06fc5fb
- planetargon oh_my_zsh: before 11-11-2021

## Every score

- @huntrdev: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/ohmyzsh/ohmyzsh/commit/06fc5fb> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-3725](https://www.cve.org/CVERecord?id=CVE-2021-3725), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3725](https://nvd.nist.gov/vuln/detail/CVE-2021-3725), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3725 · Whole record: https://cve.day/CVE-2021-3725.json · Rebuilt by cve.day 2026-11-25T22:58:05.774Z
