CVE-2021-3828: Inefficient Regular Expression Complexity in nltk/nltk

Published Sep 27, 2021
·
Updated

nltk is vulnerable to Inefficient Regular Expression Complexity

Other sources

The nltk package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide as an input to the [readcomparisonblock()(https://github.com/nltk/nltk/blob/23f4b1c4b4006b0cb3ec278e801029557cec4e82/nltk/corpus/reader/comparativesents.py#L259) function in the file nltk/corpus/reader/comparativesents.py may cause an application to consume an excessive amount of CPU.

GitHub

Affected Software

2 affected componentsFixes available
pip/nltk<3.6.4
3.6.4
nltk nltk<=3.6.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/nltk to a version that resolves this vulnerability.

    Fixed in 3.6.4

Event History

Sep 27, 2021
CVE Published
via MITRE·12:25 PM
Data Sourced
via MITRE·12:25 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 29, 2021
Advisory Published
via GitHub·05:14 PM

Frequently Asked Questions

1

What is CVE-2021-3828?

CVE-2021-3828 is a vulnerability in the nltk package that allows for ReDoS (regular expression denial of service) attacks.

2

What is the severity of CVE-2021-3828?

CVE-2021-3828 has a severity rating of 7.5 (high).

3

Which software is affected by CVE-2021-3828?

The nltk package version up to and including 3.6.4 is affected by CVE-2021-3828.

4

How can I fix CVE-2021-3828?

To fix CVE-2021-3828, update the nltk package to version 3.6.5 or later.

5

What is ReDoS?

ReDoS stands for regular expression denial of service, a type of attack that exploits inefficient regular expressions to cause a denial of service.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203