NLTK fixes ARFF directive-injection flaw in version 3.10.4

  • NLTK
  • Weka
  • ARFF schema

Flaw allowed attackers to manipulate Weka ARFF data

Issue affected NLTK versions up to 3.10.3

Update to version 3.10.4 to resolve the risk

NLTK’s `ARFF_Formatter` contains a vulnerability that lets attackers inject Weka ARFF directives through class labels in training data. The issue affects NLTK versions through 3.10.3, and NLTK fixed it in version 3.10.4.

The vulnerability can affect applications that pass attacker-influenced training data to `WekaClassifier.train()` or `ARFF_Formatter.from_train()`. The formatter writes class labels into an ARFF schema declaration without quoting or escaping them; ARFF is a format Weka uses to describe datasets. A malicious label can break out of the label list and add schema or data directives to the generated file.