CVE-2026-129221: NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, nltk.classify.weka.ARFFFormatter writes attacker-controlled class labels into the Weka ARFF @ATTRIBUTE '-label-' declaration without safely formatting the label tokens. Crafted labels can alter the generated ARFF schema or records, corrupting classifier input and causing integrity loss or processing failure. This issue is fixed in version 3.10.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.10.4
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using NLTK versions prior to 3.10.4 are affected when they use nltk.classify.weka.ARFF_Formatter to generate Weka ARFF data from attacker-controlled class labels.
What does an attacker need to exploit this issue?
An attacker needs the ability to supply or influence class-label values that are passed to ARFF_Formatter. The crafted labels can modify the generated ARFF schema or records.
What is the impact of a successful exploit?
A successful exploit can corrupt classifier input, causing integrity loss or processing failure. The provided data does not indicate confidentiality impact.
How can the issue be remediated?
Upgrade NLTK to version 3.10.4, which fixes the unsafe formatting of class labels in the Weka ARFF attribute declaration.