NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels
CVE-2026-129221
Description Summary nltk.classify.weka.ARFFFormatter 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 ARFFFormatter.fromtrain() 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. Technical Details The vulnerable code path is: 1. WekaClassifier.train() calls ARFFFormatter.fromtrain(featuresets). 2. fromtrain() extracts labels from the training data and passes them to ARFFFormatter(labels, features). 3. headersection() uses ",".join(self.labels) directly, embedding attacker‑controlled strings into the ARFF header without sanitization. Because the label names are not escaped, a label containing safe}\n@ATTRIBUTE injected NUMERIC\n@DATA\n0,owned\n% will close the label…
Assessment
- CVSS
- 5.4 (v3.1)
- Severity
- Medium
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 19 November 2026
- Last updated
- 19 November 2026
- Affected
- nltk
- Weakness
- CWE-74
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
At the source
References
- https://github.com/nltk/nltk/security/advisories/GHSA-9ffx-rrgx-mhgx
- https://nvd.nist.gov/vuln/detail/CVE-2026-129221
- https://github.com/nltk/nltk/pull/3768
- https://github.com/nltk/nltk/commit/56031eabc1ac6e5a109cb78bb18d10e0b7589594
- https://github.com/nltk/nltk/releases/tag/v3.10.4
- https://github.com/advisories/GHSA-9ffx-rrgx-mhgx
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-129221