{"vuln_id":"GHSA-x8q7-6c7m-52gw","aliases":["CVE-2026-128138","CVE-2026-12841","GHSA-m4rf-3fr8-xwx3"],"description":"NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments","published_at":"2026-11-19T23:55:54Z","modified_at":"2026-11-20T00:15:05.411020Z","first_seen_at":"2026-11-21T19:15:19.349001Z","severity":"critical","severity_source":"ghsa","cvss_score":9.8,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-77","CWE-88"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-x8q7-6c7m-52gw"},"matched_alias":null,"items":[{"id":10689,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-x8q7-6c7m-52gw: NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments","summary":"NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments\n\n## Summary\n\nNLTK 3.10.3 contains security hardening intended to close JVM argument-injection and untrusted JAR/classpath execution paths in `nltk.internals.java()`, including the issue published as GHSA-m4rf-3fr8-xwx3.\n\nThe patched `options` channel correctly rejects Java argument-file references such as `@/path/to/args` and launcher modes such as `-jar`. However, an additional argument channel remains: the caller-provided `cmd` sequence is appended to the Java command after the validated option and classpath channels, without enforcing that its first item is a Java main-class name.\n\nI am reporting this as an additional post-fix bypass / incomplete-fix path affecting the 3.10.3 remediation, rather than as an unrelated vulnerability family.\n\nAs a result, the same launcher token that is rejected through `options` can be supplied as the first `cmd` item. I confirmed two reachable forms against the official `nltk-3.10.3-py3-none-any.whl`:\n\n1. direct use of the public `nltk.internals.java()` helper with `cmd=[\"-jar\", ...]`; and\n2. the higher-level `StanfordSegmenter`, whose public `java_class` constructor argument becomes the first `cmd` item and accepts an `@argfile` launcher token.\n\nBoth paths execute an external researcher-controlled JAR without setting `NLTK_ALLOW_UNSAFE_JARS`, `NLTK_ALLOW_UNSAFE_CLASSPATH`, or using `trusted_raw_options`. The original explicit outside-classpath route is blocked in 3.10.3, while the alternate command channel executes the JAR 3/3 times.\n\n## Affected artifact\n\n```text\nPackage: nltk\nConfirmed affected version: 3.10.3\nWheel: nltk-3.10.3-py3-none-any.whl\nSHA-256: ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c\n```\n\nBaseline artifact:\n\n```text\nVersion: 3.10.2\nWheel: nltk-3.10.2-py3-none-any.whl\nSHA-256: 2c7ccacb765c5e26b0cb60fb1b57080af522c6924d12a714a243305ba3637412\n```\n\n## Relationship to the 3.10.3 security fixes\n\nThe existing 3.10.3 hardening validates the dedicated per-call `options` list before it reaches `subprocess.Popen`. In particular, the exact `@argfile` token used in this report is rejected through `options` with a `ValueError` that references CVE-2026-12841 and CWE-88.\n\nThe command is subsequently assembled in this order:\n\n```python\nfinal_cmd.extend(validated_options)\nif classpath_arg is not None:\n    final_cmd.extend([\"-cp\", classpath_arg])\nfinal_cmd.extend(cmd_list)\n```\n\n`cmd_list` is copied from the public `cmd` argument but its first token is not checked to ensure that it is an ordinary Java main class. Java therefore interprets leading `-jar`, `@argfile`, module-mode, or classpath-mode tokens as launcher control arguments rather than application arguments.\n\nThis is an alternate argument channel around the same JVM argument/JAR execution boundary protected by the 3.10.3 changes.\n\n## Confirmed API paths\n\n### Direct public helper\n\n```python\nnltk.internals.java(\n    [\"-jar\", \"/outside/trusted/roots/controlled.jar\"],\n    classpath=None,\n    stdout=\"pipe\",\n    stderr=\"pipe\",\n)\n```\n\nThe exte\n\nAffected: PyPI:nltk\n\nFixed in: 3.10.4\n\nReferences:\nhttps://github.com/nltk/nltk/security/advisories/GHSA-x8q7-6c7m-52gw\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-128138\nhttps://github.com/nltk/nltk/pull/3771\nhttps://github.com/nltk/nltk/commit/b36212795a522d2b7b176cf0e0d9d8da489ba6e6\nhttps://github.com/nltk/nltk\nhttps://github.com/nltk/nltk/releases/tag/v3.10.4","url":"https://osv.dev/vulnerability/GHSA-x8q7-6c7m-52gw","published_at":"2026-11-19T23:55:54Z","updated_at":"2026-11-20T00:15:05.411020Z","fetched_at":"2026-11-21T19:15:55.946105Z","severity":"critical","cvss_score":9.8,"epss":0.00683,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-128138","vuln_ids":["CVE-2026-128138","CVE-2026-12841","GHSA-M4RF-3FR8-XWX3","GHSA-X8Q7-6C7M-52GW"],"tags":["osv","pypi","fix-available"],"cluster_id":2134,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10689","html":"https://vulnwatch.ve1ve2.com/item/10689"}},{"id":2351,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-x8q7-6c7m-52gw / CVE-2026-128138: NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments","summary":"NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments\n\n## Summary\n\nNLTK 3.10.3 contains security hardening intended to close JVM argument-injection and untrusted JAR/classpath execution paths in `nltk.internals.java()`, including the issue published as GHSA-m4rf-3fr8-xwx3.\n\nThe patched `options` channel correctly rejects Java argument-file references such as `@/path/to/args` and launcher modes such as `-jar`. However, an additional argument channel remains: the caller-provided `cmd` sequence is appended to the Java command after the validated option and classpath channels, without enforcing that its first item is a Java main-class name.\n\nI am reporting this as an additional post-fix bypass / incomplete-fix path affecting the 3.10.3 remediation, rather than as an unrelated vulnerability family.\n\nAs a result, the same launcher token that is rejected through `options` can be supplied as the first `cmd` item. I confirmed two reachable forms against the official `nltk-3.10.3-py3-none-any.whl`:\n\n1. direct use of the public `nltk.internals.java()` helper with `cmd=[\"-jar\", ...]`; and\n2. the higher-level `StanfordSegmenter`, whose public `java_class` constructor argument becomes the first `cmd` item and accepts an `@argfile` launcher token.\n\nBoth paths execute an external researcher-controlled JAR without setting `NLTK_ALLOW_UNSAFE_JARS`, `NLTK_ALLOW_UNSAFE_CLASSPATH`, or using `trusted_raw_options`. The original explicit outside-classpath route is blocked in 3.10.3, while the alternate command channel executes the JAR 3/3 times.\n\n## Affected artifact\n\n```text\nPackage: nltk\nConfirmed affected version: 3.10.3\nWheel: nltk-3.10.3-py3-none-any.whl\nSHA-256: ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c\n```\n\nBaseline artifact:\n\n```text\nVersion: 3.10.2\nWheel: nltk-3.10.2-py3-none-any.whl\nSHA-256: 2c7ccacb765c5e26b0cb60fb1b57080af522c6924d12a714a243305ba3637412\n```\n\n## Relationship to the 3.10.3 security fixes\n\nThe existing 3.10.3 hardening validates the dedicated per-call `options` list before it reaches `subprocess.Popen`. In particular, the exact `@argfile` token used in this report is rejected through `options` with a `ValueError` that references CVE-2026-12841 and CWE-88.\n\nThe command is subsequently assembled in this order:\n\n```python\nfinal_cmd.extend(validated_options)\nif classpath_arg is not None:\n    final_cmd.extend([\"-cp\", classpath_arg])\nfinal_cmd.extend(cmd_list)\n```\n\n`cmd_list` is copied from the public `cmd` argument but its first token is not checked to ensure that it is an ordinary Java main class. Java therefore interprets leading `-jar`, `@argfile`, module-mode, or classpath-mode tokens as launcher control arguments rather than application arguments.\n\nThis is an alternate argument channel around the same JVM argument/JAR execution boundary protected by the 3.10.3 changes.\n\n## Confirmed API paths\n\n### Direct public helper\n\n```python\nnltk.internals.java(\n    [\"-jar\", \"/outside/trusted/roots/controlled.jar\"],\n    classpath=None,\n    stdout=\"pipe\",\n    stderr=\"pipe\",\n)\n```\n\nThe exte\n\nAffected packages: pip:nltk\nPatched: nltk 3.10.4","url":"https://github.com/advisories/GHSA-x8q7-6c7m-52gw","published_at":"2026-11-19T23:55:54Z","updated_at":"2026-11-19T23:55:55Z","fetched_at":"2026-11-21T19:15:18.416770Z","severity":"critical","cvss_score":9.8,"epss":0.00683,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-128138","vuln_ids":["CVE-2026-128138","CVE-2026-12841","GHSA-M4RF-3FR8-XWX3","GHSA-X8Q7-6C7M-52GW"],"tags":["ghsa","pip","CWE-77","CWE-88"],"cluster_id":2134,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2351","html":"https://vulnwatch.ve1ve2.com/item/2351"}},{"id":9030,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-128138: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Proc…","summary":"NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.3 until 3.10.4, the NLTK 3.10.3 JVM hardening validates Java launcher tokens in the options channel but appends the caller-controlled cmd sequence without requiring its first token to be a main class. Supplying -jar or an @argfile through nltk.internals.java or StanfordSegmenter.java_class can therefore execute attacker-selected Java bytecode without the unsafe-JAR opt-in. This issue is fixed in version 3.10.4.\n\nReferences:\nhttps://github.com/nltk/nltk/commit/b36212795a522d2b7b176cf0e0d9d8da489ba6e6\nhttps://github.com/nltk/nltk/pull/3771\nhttps://github.com/nltk/nltk/releases/tag/v3.10.4\nhttps://github.com/nltk/nltk/security/advisories/GHSA-x8q7-6c7m-52gw\nhttps://github.com/nltk/nltk/security/advisories/GHSA-x8q7-6c7m-52gw","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-128138","published_at":"2026-11-19T18:18:06.150000Z","updated_at":"2026-11-19T19:17:21.040000Z","fetched_at":"2026-11-21T19:15:31.484684Z","severity":"critical","cvss_score":9.8,"epss":0.00683,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-128138","vuln_ids":["CVE-2026-128138","CVE-2026-12841","GHSA-M4RF-3FR8-XWX3","GHSA-X8Q7-6C7M-52GW"],"tags":["CWE-77","CWE-88"],"cluster_id":837,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/9030","html":"https://vulnwatch.ve1ve2.com/item/9030"}}]}