# CVE-2021-3727: 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.03%, higher than 64% of CVEs (2026-12-01)
- Published: 2021-11-30T09:30:17.000Z
- Modified: 2026-06-17T04:05:38.883Z
- Weaknesses: CWE-78
- Assigned by: @huntrdev

## Description

# Vulnerability in `rand-quote` and `hitokoto` plugins **Description**: the `rand-quote` and `hitokoto` fetch quotes from quotationspage.com and hitokoto.cn respectively, do some process on them and then use `print -P` to print them. If these quotes contained the proper symbols, they could trigger command injection. Given that they're an external API, it's not possible to know if the quotes are safe to use. **Fixed in**: [72928432](https://github.com/ohmyzsh/ohmyzsh/commit/72928432). **Impacted areas**: - `rand-quote` plugin (`quote` function). - `hitokoto` plugin (`hitokoto` function).

(As written by CVE List.)

## Affected

- ohmyzsh ohmyzsh/ohmyzsh: from unspecified before 72928432
- planetargon oh_my_zsh: before 72928432

## 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 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

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

## Sources

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

---

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