CVE-2021-3727
JSON

7.5high

OS Command Injection in ohmyzsh/ohmyzsh

Severity
7.5high CVSS:3.1 by @huntrdev
Exploit likelihood
1.03% (higher than 64% of CVEs; EPSS, by FIRST)
Published
Last changed
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).

Affected

Product or packageVersionsReported by
ohmyzsh ohmyzsh/ohmyzshfrom unspecified before 72928432CVE List
planetargon oh_my_zshbefore 72928432NVD

All scores

@huntrdev7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

# 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).

NVD (es)

# Vulnerabilidad en los plugins "rand-quote" y "hitokoto" **Descripción**: los plugins "rand-quote" y "hitokoto" obtienen las citas de quotationspage.com y hitokoto.cn respectivamente, realizan algún proceso sobre ellas y luego usan "print -P" para imprimirlas. Si estas cotizaciones contienen los símbolos apropiados, podrían desencadenar una inyección de comandos. Dado que se trata de una API externa, no es posible saber si las comillas son seguras de usar. **Corregido en**: [72928432](https://github.com/ohmyzsh/ohmyzsh/commit/72928432). **Áreas afectadas**: - Plugin "rand-quote" (función "quote"). - Plugin "hitokoto" (función "hitokoto")

References

Sources

SourceRecordLicence
CVE ListCVE-2021-3727 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-3727 changed 2026-06-17Public domain