All vulnerabilities

PyPI

CVE-2026-129221

NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels

Severity
Medium 5.4
Published
19 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.4% in the next 30 daysHigher than 38% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Injection (CWE-74)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Change some data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Also known as
GHSA-9ffx-rrgx-mhgx
Sources
OSV.dev and GitHub

Description

nltk.classify.weka.ARFF_Formatter writes class labels directly into the Weka ARFF @ATTRIBUTE '-label-' {...} declaration without any ARFF quoting or escaping. An attacker who can contribute class labels to a training dataset can include ARFF metacharacters such as }, newlines, @ATTRIBUTE, and @DATA to break out of the nominal label list and inject attacker‑controlled ARFF schema and data directives.

This vulnerability is reachable in any application that calls WekaClassifier.train() or ARFF_Formatter.from_train() with attacker‑influenced training data. The victim does not need to manually edit the ARFF file; the normal training workflow writes the malformed ARFF automatically.

The vulnerable code path is:

  • WekaClassifier.train() calls ARFF_Formatter.from_train(featuresets).
  • from_train() extracts labels from the training data and passes them to ARFF_Formatter(labels, features).
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • Every version before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References