CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-21439
2.00.01%

Smoke and Mirrors: Terminal Injection in badkeys (CVE-2026-21439)

Alon Barad
Alon Barad
Software Engineer

Jan 6, 2026·6 min read·2 visits

PoC Available

Executive Summary (TL;DR)

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.

Official Patches

badkeysPatch commit for runcli.py

Fix Analysis (2)

Technical Appendix

CVSS Score
2.0/ 10
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
EPSS Probability
0.01%
Top 100% most exploited

Affected Systems

badkeys CLI tool <= 0.0.15Systems relying on badkeys for automated auditing

Affected Versions Detail

Product
Affected Versions
Fixed Version
badkeys
badkeys
<= 0.0.150.0.16
AttributeDetail
CWE IDCWE-150
Attack VectorLocal / User Interaction
CVSS v4.02.0 (Low)
ImpactUI Spoofing / Integrity Loss
Exploit StatusProof of Concept Available
VectorArgument Injection / File Content

MITRE ATT&CK Mapping

T1036Masquerading
Defense Evasion
T1204User Execution
Execution
CWE-150
Improper Neutralization of Escape, Meta, or Control Sequences

Improper Neutralization of Escape, Meta, or Control Sequences

Known Exploits & Detection

GitHub IssuesOriginal issue report demonstrating control character injection

Vulnerability Timeline

Vulnerability reported and fixed in source
2026-01-02
GHSA Advisory Published
2026-01-05
CVE Assigned
2026-01-06

References & Sources

  • [1]GHSA-wjpc-4f29-83h3
  • [2]CWE-150

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.