---
id: CVE-2026-12252
title: >-
  In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes
  (StanfordPOSTagger, StanfordNERTagger, StanfordParser,
  StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable
  to untrusted JAR code execution.…
summary: >-
  In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes
  (StanfordPOSTagger, StanfordNERTagger, StanfordParser,
  StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable
  to untrusted JAR code execution.…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-94
  - CWE-347
published: '2026-07-04'
updated: '2026-07-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-12252'
references:
  - url: 'https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb'
    label: security@huntr.dev
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-12252'
  - url: 'https://github.com/nltk/nltk/pull/3743'
  - url: >-
      https://github.com/nltk/nltk/commit/006f4b83d430147b067b81e2cddd226d6fa405c8
  - url: >-
      https://github.com/nltk/nltk/commit/24777f0cb8c33ed2839d16e0f8169a3c312a6806
  - url: 'https://github.com/nltk/nltk/releases/tag/v3.10.3'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-2085.yaml
  - url: 'https://github.com/advisories/GHSA-9r6g-266r-89x4'
  - url: 'https://github.com/nltk/nltk'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12252.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-12252'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2496984'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-12252'
tags:
  - nvd
  - ghsa
  - pip
  - osv
  - csaf
  - vex
  - red-hat
epss: 0.00195
epssPercentile: 0.09069
ingestedAt: '2026-07-04T21:57:46.862Z'
aliases:
  - GHSA-9r6g-266r-89x4
  - PYSEC-2026-2085
ecosystem: pip
vendor: nltk
product: nltk
affected:
  - nltk < 3.9.4
patched:
  - nltk 3.9.4
---

## Overview

In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable to untrusted JAR code execution. These classes accept user-controllable JAR paths and execute them via the `java()` function, which invokes `subprocess.Popen()` without integrity verification. This vulnerability is identical to CVE-2026-0848, which was fixed for StanfordSegmenter by adding SHA256 verification. However, the fix was not applied to these additional classes, leaving them susceptible to arbitrary code execution when loading untrusted JAR files.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-12252)

Affected packages:

- `nltk < 3.9.4`

Patched in:

- `nltk 3.9.4`

Source: https://github.com/advisories/GHSA-9r6g-266r-89x4

## Vendor advisories

- **Red Hat VEX** · Important · affected: OpenShift Lightspeed · no fix planned: OpenShift Lightspeed · updated 2026-10-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12252.json)
