Jan 6, 2026·6 min read·2 visits
badkeys versions <= 0.0.15 trusted user input too much when printing results. Attackers could inject ANSI escape codes (like `\x1b[2K`) into key metadata or filenames. When `badkeys` printed these strings, the terminal executed the codes, allowing attackers to delete lines (hiding positive results) or spoof output. Fixed in 0.0.16 via `repr()` sanitization.
A classic terminal escape injection vulnerability in the 'badkeys' cryptographic auditing tool allowed attackers to manipulate scan results. By embedding ANSI escape sequences in filenames, SSH comments, or DKIM records, malicious actors could hide vulnerability warnings or forge fake alerts directly in the auditor's terminal.
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P| Product | Affected Versions | Fixed Version |
|---|---|---|
badkeys badkeys | <= 0.0.15 | 0.0.16 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-150 |
| Attack Vector | Local / User Interaction |
| CVSS v4.0 | 2.0 (Low) |
| Impact | UI Spoofing / Integrity Loss |
| Exploit Status | Proof of Concept Available |
| Vector | Argument Injection / File Content |
Improper Neutralization of Escape, Meta, or Control Sequences