# CVE-2021-3013: OS command injection in ripgrep

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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.93%, higher than 80% of CVEs (2026-12-01)
- Published: 2021-06-11T11:19:37.000Z
- Modified: 2026-06-17T04:04:33.780Z
- Also known as: GHSA-g4xg-fxmg-vcg5, RUSTSEC-2021-0071
- Weaknesses: CWE-78
- Assigned by: mitre

## Description

ripgrep before 13 on Windows allows attackers to trigger execution of arbitrary programs from the current working directory via the -z/--search-zip or --pre flag.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- ripgrep (crates.io): before 13.0.0
- grep-cli (crates.io): before 0.1.6; from 0.0.0-0 before 0.1.6
- ripgrep_project ripgrep: before 13.0.0

## Every score

- GitHub: 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`
- RustSec Advisory Database: 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: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/BurntSushi/ripgrep/blob/master/CHANGELOG.md> (patch, third-party-advisory, web)
- <https://github.com/BurntSushi/ripgrep/blob/e48a17e1891e1ea9dd06ba0e48d5fb140ca7c0c4/CHANGELOG.md> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3013> (advisory)
- <https://github.com/BurntSushi/ripgrep/issues/1773> (report, web)
- <https://github.com/BurntSushi/ripgrep> (package)
- <https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md#1300-2021-06-12> (web)
- <https://rustsec.org/advisories/RUSTSEC-2021-0071.html> (advisory, web)
- <https://crates.io/crates/grep-cli> (package)

## Sources

- CVE List: [CVE-2021-3013](https://www.cve.org/CVERecord?id=CVE-2021-3013), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-g4xg-fxmg-vcg5](https://github.com/advisories/GHSA-g4xg-fxmg-vcg5), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0071](https://rustsec.org/advisories/RUSTSEC-2021-0071.html), CC0-1.0, modified 2023-11-08
- NVD: [CVE-2021-3013](https://nvd.nist.gov/vuln/detail/CVE-2021-3013), Public domain, modified 2026-06-17

---

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