7.5
CWE
1333
Advisory Published
Advisory Published
Updated

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

First published: Tue Jan 04 2022(Updated: )

Last updated 24 March 2025

Credit: security@huntr.dev security@huntr.dev

Affected SoftwareAffected VersionHow to fix
pip/nltk<3.6.6
3.6.6
debian/nltk<=3.5-1
3.8-1
3.9.1-2
Natural Language Toolkit<3.6.6
Debian Linux=9.0
Debian Linux=10.0
Debian Linux=11.0
Red Hat Fedora=35

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2021-3842?

    CVE-2021-3842 is a vulnerability in NLTK that allows for Regular Expression Denial of Service (REDoS) attacks in certain RegexpTaggers used in the functions `get_pos_tagger` and `malt_regex_tagger`.

  • How severe is CVE-2021-3842?

    CVE-2021-3842 has a severity score of 7.5, which is considered high.

  • What software is affected by CVE-2021-3842?

    NLTK version 3.6.6 installed through pip is affected by CVE-2021-3842.

  • How can I fix CVE-2021-3842?

    To fix CVE-2021-3842, update NLTK to version 3.6.6 using pip.

  • Where can I find more information about CVE-2021-3842?

    You can find more information about CVE-2021-3842 at the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-3842), [NLTK GitHub Commit](https://github.com/nltk/nltk/commit/2a50a3edc9d35f57ae42a921c621edc160877f4d), [Huntr Bounty](https://huntr.dev/bounties/761a761e-2be2-430a-8d92-6f74ffe9866a).

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203