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

High 7.5 Published Updated

Attackers can execute arbitrary commands via crafted Git branch names in specific Oh My Zsh themes, requiring users to update the framework.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2021-3769?

CVE-2021-3769 is a high-severity command injection vulnerability in ohmyzsh/ohmyzsh, published on 30 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

# Vulnerability in `pygmalion`, `pygmalion-virtualenv` and `refined` themes **Description**: these themes use `print -P` on user-supplied strings to print them to the terminal. All of them do that on git information, particularly the branch name, so if the branch has a specially-crafted name the vulnerability can be exploited. **Fixed in**: [b3ba9978](https://github.com/ohmyzsh/ohmyzsh/commit/b3ba9978). **Impacted areas**: - `pygmalion` theme. - `pygmalion-virtualenv` theme. - `refined` theme.

Weakness: CWE-78

Which versions are affected by CVE-2021-3769?

It affects 1 product.

Products include Planetargon Oh My Zsh.

How do I fix CVE-2021-3769?

No fix has been published for CVE-2021-3769 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-3769 being exploited?

There is no known exploitation of CVE-2021-3769 in the wild and no public exploit code.

Sources

Also known as GHSA-f8r6-c3hp-ccv4.

Is CVE-2021-3769 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free