Rust advisories / bat
Vulnerability HighRUSTSEC-2021-0106 · bat
RUSTSEC-2021-0106: Uncontrolled Search Path Element in sharkdp/bat
Short answerA security vulnerability in the bat crate: Uncontrolled Search Path Element in sharkdp/bat. High severity (CVSS 7.8). Fixed in 0.18.2: update to a fixed version.
| Crate | bat |
|---|---|
| Type | Vulnerability (code-execution) |
| Affected versions | Before 0.18.2. |
| Fixed in | 0.18.2 |
| Severity | High, CVSS 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2021-07-15 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-36753, GHSA-p24j-h477-76q3 |
What to do
- See which version you have:
cargo tree -i bat(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p bat. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplebat = "0.18.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
bat on windows before 0.18.2 executes programs named less.exe from the current working directory. This can lead to unintended code execution.
References
- Package: crates.io/crates/bat
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0106.html
- Web: nvd.nist.gov/vuln/detail/CVE-2021-36753
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?