7.5
HIGH
CVE-2021-43854
NLTK Regular Expression Denial of Service (ReDoS) Vulnerability
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.

INFO

Published Date :

Dec. 23, 2021, 6:15 p.m.

Last Modified :

Jan. 4, 2022, 4:38 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

3.9
Public PoC/Exploit Available at Github

CVE-2021-43854 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2021-43854 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Nltk nltk
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-43854.

URL Resource
https://github.com/nltk/nltk/commit/1405aad979c6b8080dbbc8e0858f89b2e3690341 Patch Third Party Advisory
https://github.com/nltk/nltk/issues/2866 Exploit Issue Tracking Patch Third Party Advisory
https://github.com/nltk/nltk/pull/2869 Exploit Patch Third Party Advisory
https://github.com/nltk/nltk/security/advisories/GHSA-f8m6-h2c7-8h9x Exploit Patch Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Research CVEs

Updated: 2 years, 2 months ago
0 stars 0 fork 0 watcher
Born at : July 18, 2022, 3:23 p.m. This repo has been linked 36 different CVEs too.

List of RegEx DoS (ReDoS) CVEs and resources

security awesome redos regex dos regex-dos pentesting awesome-list regex-security

Updated: 3 months ago
23 stars 2 fork 2 watcher
Born at : June 10, 2021, 1:57 a.m. This repo has been linked 76 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-43854 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-43854 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Jan. 04, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:N/I:N/A:P)
    Changed Reference Type https://github.com/nltk/nltk/commit/1405aad979c6b8080dbbc8e0858f89b2e3690341 No Types Assigned https://github.com/nltk/nltk/commit/1405aad979c6b8080dbbc8e0858f89b2e3690341 Patch, Third Party Advisory
    Changed Reference Type https://github.com/nltk/nltk/issues/2866 No Types Assigned https://github.com/nltk/nltk/issues/2866 Exploit, Issue Tracking, Patch, Third Party Advisory
    Changed Reference Type https://github.com/nltk/nltk/pull/2869 No Types Assigned https://github.com/nltk/nltk/pull/2869 Exploit, Patch, Third Party Advisory
    Changed Reference Type https://github.com/nltk/nltk/security/advisories/GHSA-f8m6-h2c7-8h9x No Types Assigned https://github.com/nltk/nltk/security/advisories/GHSA-f8m6-h2c7-8h9x Exploit, Patch, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* versions up to (excluding) 3.6.5
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-43854 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-43854 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.37 }} 0.06%

score

0.73070

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability