CVE-2026-21439
JSON

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 packageVersionsReported by
badkeys badkeys< 0.0.16, before 0.0.16CVE List, NVD
badkeys (PyPI)before 0.0.16GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M2.0low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS: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

CWE-150

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

https://github.com/badkeys/badkeys/issues/40

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

Sources

SourceRecordLicence
CVE ListCVE-2026-21439 changed 2026-01-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-wjpc-4f29-83h3 changed 2026-07-07CC-BY-4.0
NVDCVE-2026-21439 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1212 changed 2026-07-07CC-BY-4.0