CVE-2026-12841: JVM argument injection in NLTK Java invocation
CVE-2026-12841 concerns insufficient validation of JVM arguments in NLTK's Java invocation functionality. Attacker-controlled launcher arguments can introduce JVM behavior outside the intended options allowlist, potentially enabling arbitrary code execution. NLTK uses _validate_java_options() to restrict these arguments. Subsequent bypasses involving per-call options and the main-class command channel are distinct follow-on issues; the command-channel bypass is separately identified as CVE-2026-128138.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Malicious JVM options can enable Java or native agent loading, expose a JDWP debugging interface, or expand attacker-controlled argument files. Depending on the accepted options and available resources, exploitation can result in arbitrary code execution with the privileges of the application invoking Java.
Mitigation
If you can’t patch tonight, do this now.
Do not allow untrusted users, configuration, or environment values to determine JVM options. Apply a restrictive allowlist before Java invocation and reject agent-loading, remote-debugging, and argument-file options. Prevent untrusted control of Java command tokens and wrapper main-class parameters to address related bypasses. Restrict access to debugging ports and run Java subprocesses with least privilege.
Remediation
Patch, then assume compromise.
Deploy an NLTK build that applies _validate_java_options() to all JVM-option entry points, including per-call options passed to nltk.internals.java(). The exact first fixed release for CVE-2026-12841 is not established. NLTK 3.10.3 fixes an associated per-call-options bypass but remains affected by the separate command-channel bypass. For that additional issue, verify deployment of the upstream command-token validation fix from PR #3771; its advisory identifies NLTK 3.10.4 as fixed.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2026-12841 exploited in the wild?
- As of Nov 20, 2026, Mallory has no reports of CVE-2026-12841 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-12841?
- As of Nov 20, 2026, Mallory has found no public exploit for CVE-2026-12841.
- Is there a patch for CVE-2026-12841?
- Deploy an NLTK build that applies _validate_java_options() to all JVM-option entry points, including per-call options passed to nltk.internals.java(). The exact first fixed release for CVE-2026-12841 is not established.
Recent activity
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.