Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-43854

published high CVSS 3.1 · 7.5

Inefficient Regular Expression Complexity in nltk

Published
23 Dec 2021, 17:55:11 UTC
Updated
04 Aug 2024, 04:10:16 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
nltk — nltk< 3.6.5 Affected Not stated GitHub_M
Ubuntu bionic nltk Advisory build 3.2.5-1ubuntu0.1+esm2 USN-7365-1
Ubuntu focal nltk Advisory build 3.4.5-2ubuntu0.1~esm2 USN-7365-1
Ubuntu trusty nltk Advisory build 2.0~b9-0ubuntu4.1~esm4 USN-7365-1
Ubuntu xenial nltk Advisory build 3.1-1ubuntu0.1+esm2 USN-7365-1
Ubuntu bionic python-nltk Advisory build 3.2.5-1ubuntu0.1+esm2 USN-7365-1
Ubuntu bionic python3-nltk Advisory build 3.2.5-1ubuntu0.1+esm2 USN-7365-1
Ubuntu focal python3-nltk Advisory build 3.4.5-2ubuntu0.1~esm2 USN-7365-1
Show 3 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Ubuntu trusty python-nltk Advisory build 2.0~b9-0ubuntu4.1~esm4 USN-7365-1
Ubuntu xenial python-nltk Advisory build 3.1-1ubuntu0.1+esm2 USN-7365-1
Ubuntu xenial python3-nltk Advisory build 3.1-1ubuntu0.1+esm2 USN-7365-1

Description

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, sent_tokenize and word_tokenize. 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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

4

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.5 / 10
Severity
high
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
nltk nltk < 3.6.5 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-400 CWE-400: Uncontrolled Resource Consumption (GitHub_M · cna)

References

4

Provider assertions

2

GitHub_M · cna

Inefficient Regular Expression Complexity in nltk

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
8fffd4bdbd421cc023cc94c0fbd8520e2ca6b10cad60b4694115326960afedd6
Ingested
23 Sep 2026, 07:56:36 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected