badkeys vulnerable to ASCII control character injection on console via malformed input
Impact
An attacker may inject content with ASCII control characters like vertical tabs, ANSI escape sequences, etc., that can create misleading output of the badkeys command-line tool. This impacts scanning DKIM keys (both --dkim and --dkim-dns), SSH keys (--ssh-lines mode), and filenames in various modes.
Patches
This has been fixed with the following commits: https://github.com/badkeys/badkeys/commit/de631f69f040974bb5fb442cdab9a1d904c64087 https://github.com/badkeys/badkeys/commit/635a2f3b1b50a895d8b09ec8629efc06189f349a
All users should upgrade badkeys to version 0.0.16.
Resources
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | badkeys | < 0.0.16 | 0.0.16 |
References
- https://github.com/badkeys/badkeys/security/advisories/GHSA-wjpc-4f29-83h3
- https://nvd.nist.gov/vuln/detail/CVE-2026-21439
- https://github.com/badkeys/badkeys/issues/40
- https://github.com/badkeys/badkeys/commit/635a2f3b1b50a895d8b09ec8629efc06189f349a
- https://github.com/badkeys/badkeys/commit/de631f69f040974bb5fb442cdab9a1d904c64087
- https://github.com/badkeys/badkeys
- https://pypi.org/project/badkeys
- https://github.com/advisories/GHSA-wjpc-4f29-83h3
- CVSS vector
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- Weakness (CWE)
CWE-150- Platform
- Python (PyPI)
- Package
badkeys- Disclosed
- 05.01.2026
- Updated
- 11.10.2026 13:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1212 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-wjpc-4f29-83h3 - CC BY 4.0
Vulnerability history: badkeys
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.