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

- Severity: High 7.5 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.57%, higher than 76% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-04T14:50:09.000Z
- Modified: 2026-06-17T04:05:52.633Z
- Also known as: GHSA-rqjh-jp2r-59cj, PYSEC-2022-5
- Weaknesses: CWE-1333
- Assigned by: @huntrdev

## Description

nltk is vulnerable to Inefficient Regular Expression Complexity

(As written by CVE List.)

## Affected

- nltk nltk/nltk: from unspecified before 3.6.6
- nltk (PyPI): before 3.6.6; before 2a50a3edc9d35f57ae42a921c621edc160877f4d
- nltk nltk: before 3.6.6
- debian debian_linux: 9.0; 10.0; 11.0
- fedoraproject fedora: 35

## Every score

- @huntrdev: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://huntr.dev/bounties/761a761e-2be2-430a-8d92-6f74ffe9866a> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/nltk/nltk/commit/2a50a3edc9d35f57ae42a921c621edc160877f4d> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3842> (advisory)
- <https://github.com/nltk/nltk/pull/2906> (web)
- <https://github.com/nltk/nltk> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2022-5.yaml> (web)
- <https://github.com/advisories/GHSA-rqjh-jp2r-59cj> (advisory)

## Sources

- CVE List: [CVE-2021-3842](https://www.cve.org/CVERecord?id=CVE-2021-3842), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-rqjh-jp2r-59cj](https://github.com/advisories/GHSA-rqjh-jp2r-59cj), CC-BY-4.0, modified 2024-09-26
- NVD: [CVE-2021-3842](https://nvd.nist.gov/vuln/detail/CVE-2021-3842), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-5](https://osv.dev/vulnerability/PYSEC-2022-5), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-3842 · Whole record: https://cve.day/CVE-2021-3842.json · Rebuilt by cve.day 2026-11-25T22:58:06.395Z
