CVE-2026-21439: Badkeys Badkeys Vulnerable To ASCII Control Vulnerability
LOWCVE-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
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.
pip install badkeys>=0.0.16
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
CVE-2026-21439 Affected Badkeys Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
badkeys
|
PyPI |
< 0.0.16
|
0.0.16
|
References
Frequently Asked Questions
What is CVE-2026-21439?
Which Badkeys versions are affected?
What version fixes CVE-2026-21439?
Is badkeys affected?
What CWE is associated with CVE-2026-21439?
How can I check PyPI dependencies for CVE-2026-21439?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}