CVE-2026-129221
## Description ### Summary `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. ### Technical Details The vulnerable code path is: 1. `WekaClassifier.train()` calls `ARFF_Formatter.from_train(featuresets)`. 2. `from_train()` extracts labels from the training data and passes them to `ARFF_Formatter(labels, features)`. 3. `header_section()` 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 set, inject a new attribute, start a premature data section, and comment out the remaining header. ### Proof of Concept The following self‑contained Python script demonstrates the vulnerability. It requires only NLTK and does **not** need Weka to be installed, because the attack is carried out purely by generating the ARFF string. ```python from nltk.classify.weka import ARFF_Formatter # Attacker‑controlled label containing ARFF metacharacters. # The `}` closes the label set, the `@ATTRIBUTE` injects a new attribute, # `@DATA` starts the data section early, and `%` comments out the rest. malicious_label = "safe}\n@ATTRIBUTE injected NUMERIC\n@DATA\n0,owned\n%" featuresets = [ ({"f": "benign"}, "legit"), # legitimate exa
Properties
- Summary
- NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels
- Severity
- medium
- Nvd fetched at
- 2026-11-22T12:30:49.958423+00:00
- Epss score
- 0.00439
- Cvss score
- 5.4
- Cvss severity
- MEDIUM
- Retrieved at
- 2026-11-22T12:32:26+00:00
- Ghsa published
- 2026-11-19T23:54:17Z
- Source url
- https://github.com/advisories/GHSA-9ffx-rrgx-mhgx
- Ghsa updated
- 2026-11-19T23:54:18Z
- Ghsa id
- GHSA-9ffx-rrgx-mhgx
- Last source
- FIRST EPSS
- Score
- 5.4
- Cvss version
- 3.1
- Cve id
- CVE-2026-129221
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
- First seen by Signal
- 2026-11-19T19:29:21+00:00
- Name
- CVE-2026-129221
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph