CVE-2021-43854

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-43854
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-43854.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-43854
Aliases
Related
Published
2021-12-23T18:15:07Z
Modified
2025-01-15T02:08:40.970685Z
Summary
[none]
Details

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Versions prior to 3.6.5 are vulnerable to regular expression denial of service (ReDoS) attacks. The vulnerability is present in PunktSentenceTokenizer, senttokenize and wordtokenize. Any users of this class, or these two functions, are vulnerable to the ReDoS attack. In short, a specifically crafted long input to any of these vulnerable functions will cause them to take a significant amount of execution time. If your program relies on any of the vulnerable functions for tokenizing unpredictable user input, then we would strongly recommend upgrading to a version of NLTK without the vulnerability. For users unable to upgrade the execution time can be bounded by limiting the maximum length of an input to any of the vulnerable functions. Our recommendation is to implement such a limit.

References

Affected packages

Debian:11 / nltk

Package

Name
nltk
Purl
pkg:deb/debian/nltk?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

3.*

3.5-1
3.6.5-1
3.6.7-1
3.7-1
3.8-1
3.8.1-1
3.9.1-1
3.9.1-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / nltk

Package

Name
nltk
Purl
pkg:deb/debian/nltk?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.6.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / nltk

Package

Name
nltk
Purl
pkg:deb/debian/nltk?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.6.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/nltk/nltk

Affected ranges

Type
GIT
Repo
https://github.com/nltk/nltk
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed

Affected versions

2.*

2.0.1rc1
2.0.1rc2
2.0.1rc3
2.0.1rc4
2.0.3
2.0.4

3.*

3.0.0
3.0.0b1
3.0.0b2
3.0.2
3.0.3
3.0.4
3.0.5
3.0a1
3.0a4
3.1
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.3
3.4
3.4.1
3.4.3
3.4.4
3.5
3.5b1
3.6
3.6.1
3.6.2
3.6.3
3.6.4
3.6.5