---
id: 2026-11-nltk-31-advisories-jar-execution-bypass-cve-2026-128138-fixed-3-10-4
title: "NLTK: 31 advisories published 2026-11-13 to 11-19, one critical JAR execution bypass in 3.10.3 (CVE-2026-128138); all fixed in 3.10.4"
date_disclosed: 2026-11-13
last_updated: 2026-11-21
severity: high
status: patched
ecosystems: [pypi, python, rag, nlp]
tools_affected: ["nltk (PyPI) before 3.10.4", "RAG ingestion and text pipelines that tokenize or parse untrusted documents with NLTK", "applications that pass untrusted values to NLTK's Java, corpus-reader or downloader helpers"]
tags: [cve, batch, nltk, rag-ingestion, denial-of-service, path-traversal, incomplete-fix, argument-injection, fixed-earlier]
---

## TL;DR

The GitHub Advisory Database published 31 advisories for `nltk` between 2026-11-13 and 2026-11-19, read through [OSV](https://api.osv.dev/v1/vulns/GHSA-x8q7-6c7m-52gw). One is critical, 12 are high and 18 are moderate. Every one lists 3.10.4 as the fix. PyPI has carried 3.10.4 since 2026-10-21. Upgrade to 3.10.4.

## What happened

The counts come from an OSV query for the PyPI package `nltk`, made in code on 2026-11-21.

| Published | Advisories |
|---|---|
| 2026-11-13 | 5 |
| 2026-11-14 | 3 |
| 2026-11-16 | 3 |
| 2026-11-19 | 20 |

All 31 carry a CVE id. All 31 give 3.10.4 as the fixed version. The dates are the database's. The project's own advisory tab was not opened, so the vendor dates are not known.

The critical one is [GHSA-x8q7-6c7m-52gw](https://api.osv.dev/v1/vulns/GHSA-x8q7-6c7m-52gw), CVE-2026-128138. The database scores it CVSS 3.1 9.8. Its range is 3.10.3 only. The advisory says 3.10.3 hardened `nltk.internals.java()` against untrusted JAR execution, and that the caller-supplied `cmd` argument was left unchecked. `StanfordSegmenter`'s `java_class` argument reaches the same path. An application is exposed where an attacker controls one of those arguments.

This file rates the batch `high`. Both paths in the critical advisory need a caller-supplied argument, and the database rates the other 30 high or moderate.

Other advisories by type, from their titles:

| Type | Examples |
|---|---|
| CPU or recursion denial of service on crafted text, trees or XML | CVE-2026-126303, CVE-2026-128139, CVE-2026-129222, CVE-2026-129223 |
| Corpus-root escapes through symlinks or hardlinks | CVE-2026-126304, CVE-2026-128135, CVE-2026-128137 |
| Path traversal with file read and write | CVE-2026-126296 |
| Local code execution through a search path | CVE-2026-128134, CVE-2026-129234 |
| Unpickler allowlist gap | CVE-2026-128136 |

| Version | PyPI upload |
|---|---|
| 3.10.2 | 2026-08-05 |
| 3.10.3 | 2026-08-12 |
| 3.10.4 | 2026-10-21 |

## Am I affected?

- `pip show nltk` prints a version below 3.10.4.
- `pip show nltk` prints 3.10.3 and your code calls NLTK's Java-backed tools. That is the critical case.
- NLTK can arrive as a transitive dependency. Check with `pip list | grep -i nltk` in each service.
- The denial-of-service advisories matter where NLTK tokenizes or parses text that users or web pages supply.

## If you are affected

1. Upgrade: `pip install -U "nltk>=3.10.4"`, then rebuild images and lockfiles.
2. Where NLTK downloads data packages at run time, pin the data directory and download at build time.
3. No source reports exploitation. No rotation is needed for the upgrade alone.

## Prevention

- Put time and size limits around parsing of untrusted documents in an ingestion worker.
- Run ingestion workers without credentials they do not need. See [agent sandboxing](../prevention/agent-sandboxing.md).

## Sources

- [OSV record GHSA-x8q7-6c7m-52gw](https://api.osv.dev/v1/vulns/GHSA-x8q7-6c7m-52gw): read 2026-11-21. Range, score, description.
- OSV package query (`api.osv.dev/v1/query`, PyPI `nltk`): 136 records, 31 published on or after 2026-11-13. Counts by day, severity and fixed version made in code.
- [GitHub Advisory Database, reviewed pip listing](https://github.com/advisories?query=type%3Areviewed+ecosystem%3Apip+sort%3Apublished-desc): read 2026-11-21. Nine of the 2026-11-19 rows.
- [PyPI: nltk](https://pypi.org/project/nltk/): upload dates through the JSON API, 2026-11-21.
- Not opened: the `nltk/nltk` advisory tab.
