A critical flaw in NLTK's java() function lets attackers inject arbitrary JVM flags through the per-call options parameter, resulting in arbitrary code execution.
What Is It
CVE-2026-79675 is an argument injection vulnerability (CWE-88) in the Natural Language Toolkit (NLTK) Python library. Versions before 3.10.3 fail to validate JVM options supplied through the per-call options parameter of the java() function. Because the values are passed to the JVM without sanitization, an attacker who controls those options can inject dangerous JVM flags.
The disclosure identifies flags such as -agentpath, -javaagent, and @argfile as viable injection vectors. Supplied to NLTK's Stanford wrapper classes, these load attacker-specified native libraries, Java agents, or argument files at JVM startup; yielding arbitrary code execution in the context of the process.
Why It Matters
The vulnerability carries a CVSS 3.1 base score of 9.8 (CRITICAL), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, and a CVSS 4.0 score of 9.3 (CRITICAL). Both scores come from the CNA-supplied record carried in the NVD entry; not from NVD's own analysis, which has not yet been performed. The metrics describe a network-reachable issue with low attack complexity requiring no privileges and no user interaction, with high impact to confidentiality, integrity, and availability.
NLTK is a widely used NLP library distributed via PyPI (pkg:pypi/nltk). Any application that routes user-influenced input into the options parameter of java(), or into the Stanford wrapper classes that call it; inherits a direct path to code execution.
What's Vulnerable
- Vendor/Product: nltk / nltk (PyPI package
nltk) - Affected versions: all versions before 3.10.3
- Fixed version: 3.10.3 and later (marked unaffected)
- Component: the
java()function's per-calloptionsparameter, reachable through Stanford wrapper classes
Patch Status
Upgrade NLTK to 3.10.3 or later. The vendor advisory (GHSA-m4rf-3fr8-xwx3) is published on the NLTK GitHub repository. No CISA KEV entry was supplied for this CVE, so there is no confirmation of active exploitation in the provided data, and no KEV-mandated remediation deadline applies. CVSS 4.0 exploit maturity is NOT_DEFINED. Per NVD, the record was published 2026-08-25 and remains in Received status, meaning NVD analysis is not yet complete; the CNA scores above should be treated as provisional, and NVD may publish its own metrics that differ once analysis concludes.
Sources
- NLTK GitHub Security Advisory (GHSA-m4rf-3fr8-xwx3): https://github.com/nltk/nltk/security/advisories/GHSA-m4rf-3fr8-xwx3
- VulnCheck Advisory (CNA record, CVSS scores), https://www.vulncheck.com/advisories/nltk-before-jvm-argument-injection-via-per-call-options
- NVD, CVE-2026-79675 (publication date, record status), https://nvd.nist.gov/vuln/detail/CVE-2026-79675