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.
Published: 2026-01-05
Score: 2 Low
EPSS: < 1% Very Low
KEV: No
Impact: Misinformation via console output
Action: Upgrade
AI Analysis

Impact

The vulnerability arises because badkeys does not filter ASCII control characters in its console output, allowing an attacker to supply input containing such characters which may be interpreted by the terminal as formatting or command sequences, resulting in misleading output that can cause users to incorrectly assess key validity. This manifests as false positives or negatives during DKIM or SSH key scans, potentially misleading administrators. The weakness is classified as CWE‑150 because the program fails to properly validate or sanitize user-supplied strings before displaying them.

Affected Systems

Versions 0.0.15 and earlier of the badkeys tool, distributed for all operating systems as a Python package, are affected. The issue appears in command‑line modes that output key information, including DKIM (--dkim, --dkim-dns), SSH (--ssh-lines), and filename analyses. The fix is implemented in 0.0.16 and later.

Risk and Exploitability

The CVSS score of 2 indicates low severity, and the EPSS score of less than 1% suggests a very low exploitation probability. Since the flaw is limited to console output and does not grant code execution or network access, the threat is largely restricted to the local user or administrator executing badkeys. The vulnerability does not appear in the CISA KEV catalog, further indicating its low impact on widespread exploit campaigns. The best attack scenario would involve an attacker supplying specially crafted input to an unsuspecting user, potentially misleading them into trusting or ignoring a key. This risk is mitigated by applying the available patch.

Generated by OpenCVE AI on April 18, 2026 at 08:17 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade badkeys to version 0.0.16 or later.
  • Sanitize console output by filtering ASCII control characters before display.
  • Validate input to reject or escape ASCII control characters during key scanning.

Generated by OpenCVE AI on April 18, 2026 at 08:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-wjpc-4f29-83h3 badkeys vulnerable to ASCII control character injection on console via malformed input
History

Mon, 12 Jan 2026 18:30:00 +0000

Type Values Removed Values Added
First Time appeared Badkeys
Badkeys badkeys
CPEs cpe:2.3:a:badkeys:badkeys:*:*:*:*:*:python:*:*
Vendors & Products Badkeys
Badkeys badkeys
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


Tue, 06 Jan 2026 21:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 06 Jan 2026 00:00:00 +0000

Type Values Removed Values Added
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.
Title badkeys vulnerable to ASCII control character injection on console via malformed input
Weaknesses CWE-150
References
Metrics cvssV4_0

{'score': 2, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-01-06T19:01:48.962Z

Reserved: 2025-12-29T03:00:29.275Z

Link: CVE-2026-21439

cve-icon Vulnrichment

Updated: 2026-01-06T14:24:31.956Z

cve-icon NVD

Status : Analyzed

Published: 2026-01-06T00:15:49.027

Modified: 2026-01-12T18:18:59.067

Link: CVE-2026-21439

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-18T08:30:35Z

Weaknesses