Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

sharkdp/bat
master @ 04576fd
7
Fixes
1
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Command Injection: 2 prior fixes. Scrutinize any change in this area.
src/less.rs: most-fixed (2 issues). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Untrusted Path Execution: The application historically looked up command binaries in the current working directory on Windows systems, allowing local attackers to execute arbitrary code by placing a malicious `less.exe` file in the working directory (CVE-2021-36753).
Command Injection: Filename preprocessing for pager templates (`$LESSOPEN` / `$LESSCLOSE`) was vulnerable to shell command injection when processing crafted filenames due to insufficient quoting.
Arbitrary Code Execution: Executing the pager without explicit restrictions allowed arbitrary shell commands to run automatically via local or inherited `LESSOPEN` configuration environment variables.