CVE-2026-21439

badkeys vulnerable to ASCII control character injection on console via malformed input

Published Jan 5, 2026 CVSS 4.0 · 2 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
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'}

Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-150

    Improper Neutralization of Escape, Meta, or Control Sequences

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 6, 2026, 7:01 PM
Reserved
Dec 29, 2025, 3:00 AM
Status
Analyzed
Published
Jan 6, 2026, 12:15 AM
Modified
Jun 17, 2026, 10:18 AM