CVE-2026-79675: NLTK: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841)
An attacker who controls the java_options parameter to any NLTK Stanford wrapper class can inject arbitrary JVM flags, including:
-agentpath:/path/to/malicious.so– loads a native agent, achieving arbitrary code execution-javaagent:/path/to/malicious.jar– loads a Java agent for bytecode manipulation-agentlib:jdwp=transport=dt_socket,server=y,address=*:5005– enables remote debugging, allowing remote code execution@/path/to/argfile– expands an argument file, which can smuggle any of the above
This is exploitable in scenarios where NLTK is deployed as a service and java_options is derived from user input, configuration files, or environment variables. The PR #3647 commit message explicitly states the fix was intended to cover “StanfordSegmenter, and GenericStanfordParser” but the implementation only validates in config_java().
References
- github.com/advisories/GHSA-m4rf-3fr8-xwx3
- github.com/nltk/nltk/commit/8fa9650b6009aacfdebbc33d2a08d32c0858ea6c
- github.com/nltk/nltk/releases/tag/v3.10.3
- github.com/nltk/nltk/security/advisories/GHSA-m4rf-3fr8-xwx3
- nvd.nist.gov/vuln/detail/CVE-2026-79675
- www.vulncheck.com/advisories/nltk-before-jvm-argument-injection-via-per-call-options
Code Behaviors & Features
Detect and mitigate CVE-2026-79675 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →