Skip to content
CVE Ledger
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API docsPage
  • MCP serverPage
  • AboutPage
  • Data sourcesPage
  • Data statusPage
  • ChangelogPage
  • How it's builtPage
  • Support the projectPage

14 results

Back

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

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.

Timeline

  1. ID reserved

    By @huntrdev

  2. · 3 months later

    Published

  3. · 3 years later

    Record updated

Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.

Scores

CVSS scores of CVE-2021-3725, by who scored it
Scored byCVSSScoreVector
@huntrdevCNA (assigner)3.1High7.5CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
NVDNVD · Modified3.1High8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
1.1% · top 35% of all CVEs (13 Nov 2026)
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.

Affected products

What to do

Exploitation: Exploit PoC: 1. Install Oh My Zsh. 2. Enable the dirhistory plugin. 3. Open a terminal and create and cd into a directory like so: baddir="directory';id;echo 'pwned" mkdir "$baddir" && cd "$baddir" 4. Press Alt-Left to go back to previous directory (in macOS, use Option-Left). 5. id and echo pwned are executed: $ <Alt-Left> uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),... pwned

References

References1

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2021-3725 badge
[![CVE-2021-3725](https://cveledger.app/badge/CVE-2021-3725.svg)](https://cveledger.app/cve/CVE-2021-3725)

Record last updated .