Every CVE Search/ Get API key

CVE-2021-3842

Inefficient Regular Expression Complexity in nltk/nltk

7.5 HighFix available

nltk is vulnerable to Inefficient Regular Expression Complexity

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.57%Up 0.9 points since Jan 5, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.5

Inefficient Regular Expression Complexity in nltk/nltk

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
CVE-2021-3842
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-1333
Updated
2026-11-02
EUVDEUVD-2022-0162 7.5

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
EUVD-2022-0162
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-rqjh-jp2r-59cj 8.7

NLTK Vulnerable to REDoS

NLTK is vulnerable to REDoS in some RegexpTaggers used in the functions get_pos_tagger and malt_regex_tagger.

Record
GHSA-rqjh-jp2r-59cj
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-1333
Updated
2026-11-02
NVD 7.5

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
CVE-2021-3842
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-1333
Updated
2026-11-02
OSV 7.5

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
CVE-2021-3842
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-3842 7.5

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
DEBIAN-CVE-2021-3842
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-rqjh-jp2r-59cj 8.7

NLTK Vulnerable to REDoS

NLTK is vulnerable to REDoS in some RegexpTaggers used in the functions get_pos_tagger and malt_regex_tagger.

Record
GHSA-rqjh-jp2r-59cj
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-1333
Updated
2026-11-02
OSVUBUNTU-CVE-2021-3842 7.5

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
UBUNTU-CVE-2021-3842
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVPYSEC-2022-5 No score

nltk is vulnerable to Inefficient Regular Expression Complexity

Record
PYSEC-2022-5
Updated
2026-11-02
OSVUSN-7365-1 No score

nltk vulnerabilities

It was discovered that NLTK contained a regex that is susceptible to catastrophic backtracking. An attacker could possibly use this issue to cause a denial of service. (CVE-2021-3842, CVE-2021-43854)

Record
USN-7365-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
nltk
PyPI
before 3.6.6
3.6.6
nltk
Debian:12
before 3.6.7-1
3.6.7-1
nltk
Debian:13
before 3.6.7-1
3.6.7-1
nltk
Debian:14
before 3.6.7-1
3.6.7-1
nltk
PyPI
before 3.6.6, plus listed versions
0.80.90.9.30.9.40.9.5
Show 45 moreShow less
0.9.60.9.70.9.80.9.92.0.12.0.1rc12.0.1rc2-git2.0.1rc32.0.1rc42.0.22.0.32.0.42.0.52.0b42.0b52.0b62.0b72.0b82.0b93.0.03.0.0b13.0.0b23.0.13.0.23.0.33.0.43.0.53.13.23.2.13.2.23.2.33.2.43.2.53.33.43.4.13.4.23.4.33.4.43.4.53.53.5b13.63.6.1
3.6.6
nltk
Ubuntu:Pro:14.04:LTS
before 2.0~b9-0ubuntu4.1~esm4, plus listed versions
2.0~b9-0ubuntu42.0~b9-0ubuntu4.1~esm2
2.0~b9-0ubuntu4.1~esm4
nltk
Ubuntu:Pro:16.04:LTS
before 3.1-1ubuntu0.1+esm2, plus listed versions
3.0.4-13.0.5-13.1-13.1-1ubuntu0.13.1-1ubuntu0.1+esm1
3.1-1ubuntu0.1+esm2
nltk
Ubuntu:Pro:18.04:LTS
before 3.2.5-1ubuntu0.1+esm2, plus listed versions
3.2.4-13.2.5-13.2.5-1ubuntu0.13.2.5-1ubuntu0.1+esm1
3.2.5-1ubuntu0.1+esm2
nltk
Ubuntu:Pro:20.04:LTS
before 3.4.5-2ubuntu0.1~esm2, plus listed versions
3.4.5-13.4.5-23.4.5-2ubuntu0.1~esm1
3.4.5-2ubuntu0.1~esm2
nltk
Ubuntu:Pro:14.04:LTS
From an advisory covering 2 CVEs
before 2.0~b9-0ubuntu4.1~esm4, plus listed versions
2.0~b9-0ubuntu42.0~b9-0ubuntu4.1~esm2
2.0~b9-0ubuntu4.1~esm4
nltk
Ubuntu:Pro:16.04:LTS
From an advisory covering 2 CVEs
before 3.1-1ubuntu0.1+esm2, plus listed versions
3.0.4-13.0.5-13.1-13.1-1ubuntu0.13.1-1ubuntu0.1+esm1
3.1-1ubuntu0.1+esm2
nltk
Ubuntu:Pro:18.04:LTS
From an advisory covering 2 CVEs
before 3.2.5-1ubuntu0.1+esm2, plus listed versions
3.2.4-13.2.5-13.2.5-1ubuntu0.13.2.5-1ubuntu0.1+esm1
3.2.5-1ubuntu0.1+esm2
nltk
Ubuntu:Pro:20.04:LTS
From an advisory covering 2 CVEs
before 3.4.5-2ubuntu0.1~esm2, plus listed versions
3.4.5-13.4.5-23.4.5-2ubuntu0.1~esm1
3.4.5-2ubuntu0.1~esm2

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-3842 is a high vulnerability (CVSS 7.5) in Nltk, published January 4, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.57%, the 75th percentile. Fixed in nltk 3.6.6.

References

Show 6 moreShow less
This page doesn't list everything

Left out here: 4 versions. The JSON record has them.

MoveEnter Open