{"id":"CVE-2021-3842","aliases":["CVE-2021-3842","GHSA-rqjh-jp2r-59cj","PYSEC-2022-5"],"related":[],"kind":"vulnerability","state":"published","title":"Inefficient Regular Expression Complexity in nltk/nltk","summary":"nltk is vulnerable to Inefficient Regular Expression Complexity","summarySource":"cvelist","descriptions":[{"lang":"en","text":"nltk is vulnerable to Inefficient Regular Expression Complexity","source":"cvelist"},{"lang":"en","text":"NLTK is vulnerable to REDoS in some RegexpTaggers used in the functions `get_pos_tagger` and `malt_regex_tagger`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"nltk es vulnerable a una Complejidad de Expresión Regular Ineficiente","source":"nvd"}],"published":"2022-01-04T14:50:09.000Z","modified":"2026-06-17T04:05:52.633Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"3.6.6","status":"affected"}],"vendor":"nltk","product":"nltk/nltk","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.6.6"}],"ecosystem":"PyPI","package":"nltk","purl":"pkg:pypi/nltk","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.6.6"}],"vendor":"nltk","product":"nltk","cpe":"cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"},{"status":"affected","version":"10.0"},{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"2a50a3edc9d35f57ae42a921c621edc160877f4d"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.6.6"}],"ecosystem":"PyPI","package":"nltk","purl":"pkg:pypi/nltk","repo":"https://github.com/nltk/nltk","source":"pysec"}],"references":[{"url":"https://huntr.dev/bounties/761a761e-2be2-430a-8d92-6f74ffe9866a","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/nltk/nltk/commit/2a50a3edc9d35f57ae42a921c621edc160877f4d","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3842","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk/pull/2906","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2022-5.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-rqjh-jp2r-59cj","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-3842","url":"https://www.cve.org/CVERecord?id=CVE-2021-3842","licence":"CVE Terms of Use","modified":"2024-08-03T17:09:09.531Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rqjh-jp2r-59cj","url":"https://github.com/advisories/GHSA-rqjh-jp2r-59cj","licence":"CC-BY-4.0","modified":"2024-09-26T14:44:52.377Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-3842","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3842","licence":"Public domain","modified":"2026-06-17T04:05:52.633Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-5","url":"https://osv.dev/vulnerability/PYSEC-2022-5","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:27.635Z"}],"updatedAt":"2026-11-25T22:58:06.395Z","epss":{"score":0.01571,"percentile":0.76117,"date":"2026-12-01T12:00:22.000Z"}}