2.0low
badkeys vulnerable to ASCII control character injection on console via malformed input
- Severity
- 2.0low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.33% (higher than 28% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-wjpc-4f29-83h3PYSEC-2026-1212
Description
badkeys is a tool and library for checking cryptographic public keys for known vulnerabilities. In versions 0.0.15 and below, 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. This issue is fixed in version 0.0.16.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| badkeys badkeys | < 0.0.16, before 0.0.16 | CVE List, NVD |
| badkeys (PyPI) | before 0.0.16 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 2.0low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
badkeys is a tool and library for checking cryptographic public keys for known vulnerabilities. In versions 0.0.15 and below, 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. This issue is fixed in version 0.0.16.
GitHub Advisory Database
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
NVD (es)
badkeys es una herramienta y biblioteca para verificar claves públicas criptográficas en busca de vulnerabilidades conocidas. En las versiones 0.0.15 e inferiores, un atacante podría inyectar contenido con caracteres de control ASCII como tabulaciones verticales, secuencias de escape ANSI, etc., que pueden generar una salida engañosa de la herramienta de línea de comandos badkeys. Esto afecta el escaneo de claves DKIM (tanto --dkim como --dkim-dns), claves SSH (modo --ssh-lines), y nombres de archivo en varios modos. Este problema está solucionado en la versión 0.0.16.
References
| https://github.com/badkeys/badkeys/security/advisories/GHSA-wjpc-4f29-83h3 | third-party-advisory, web | |
| https://github.com/badkeys/badkeys/issues/40 | exploit, issue-tracking, third-party-advisory, web | |
| https://github.com/badkeys/badkeys/commit/635a2f3b1b50a895d8b09ec8629efc06189f349a | patch, web | |
| https://github.com/badkeys/badkeys/commit/de631f69f040974bb5fb442cdab9a1d904c64087 | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-21439 | advisory | |
| https://github.com/badkeys/badkeys | package | |
| https://pypi.org/project/badkeys | package | |
| https://github.com/advisories/GHSA-wjpc-4f29-83h3 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-21439 changed 2026-01-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wjpc-4f29-83h3 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2026-21439 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1212 changed 2026-07-07 | CC-BY-4.0 |