CVE-2026-21439: Badkeys Badkeys Vulnerable To ASCII Control Vulnerability

LOW
Advisory Identifier: GHSA-wjpc-4f29-83h3
CWE-150
Published
Advisory Summary

CVE-2026-21439 is a LOW badkeys vulnerable to ascii control vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting Badkeys libraries in the PyPI ecosystem. The issue involves badkeys vulnerable to ascii control character injection on console via malformed input. Remediation is available by upgrading affected packages to version 0.0.16.

CVE-2026-21439 at a Glance

CVE Identifier CVE-2026-21439
GHSA Identifier GHSA-wjpc-4f29-83h3
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences
Affected Product Badkeys
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-21439

To remediate this vulnerability, upgrade all affected Badkeys dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

badkeys fixed: 0.0.16
pip install badkeys>=0.0.16
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show badkeys

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-21439, inspect your installed packages using pip:

pip show badkeys

Analyze the terminal output to locate any version of Badkeys in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.16), your application is affected.

Note: The pip show badkeys command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In Badkeys, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2026-21439 Affected Badkeys Versions

1 component(s)
Fixed Versions:
0.0.16
Product / Package Ecosystem Affected Versions Fixed Version
badkeys
PyPI
< 0.0.16
0.0.16

References

Frequently Asked Questions

What is CVE-2026-21439?
CVE-2026-21439 is a security vulnerability in Badkeys involving badkeys vulnerable to ASCII control character injection on console via malformed input under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences.
Which Badkeys versions are affected?
Affected versions include releases prior to 0.0.16 across affected packages: badkeys.
What version fixes CVE-2026-21439?
Upgrading to 0.0.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is badkeys affected?
Yes, badkeys is affected in releases prior to 0.0.16. Upgrade your dependency to 0.0.16 or later.
What CWE is associated with CVE-2026-21439?
CVE-2026-21439 is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-21439?
Run the dependency tree command: 'pip show badkeys'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wjpc-4f29-83h3",
  "modified" : "2026-01-06T16:07:15Z",
  "published" : "2026-01-05T19:42:12Z",
  "aliases" : [ "CVE-2026-21439" ],
  "summary" : "badkeys vulnerable to ASCII control character injection on console via malformed input",
  "details" : "### Impact\n\nAn 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.\n\n### Patches\n\nThis has been fixed with the following commits:\nhttps://github.com/badkeys/badkeys/commit/de631f69f040974bb5fb442cdab9a1d904c64087\nhttps://github.com/badkeys/badkeys/commit/635a2f3b1b50a895d8b09ec8629efc06189f349a\n\nAll users should upgrade `badkeys` to version 0.0.16.\n\n### Resources\n\nhttps://github.com/badkeys/badkeys/issues/40",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "badkeys"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.0.15"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/badkeys/badkeys/security/advisories/GHSA-wjpc-4f29-83h3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-21439"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/badkeys/badkeys/issues/40"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/badkeys/badkeys/commit/635a2f3b1b50a895d8b09ec8629efc06189f349a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/badkeys/badkeys/commit/de631f69f040974bb5fb442cdab9a1d904c64087"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/badkeys/badkeys"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-150" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-05T19:42:12Z",
    "nvd_published_at" : "2026-01-06T00:15:49Z"
  }
}