Bug 2037526 (CVE-2021-3842)

Summary: CVE-2021-3842 python-nltk: ReDoS in function get_pos_tagger and malt_regex_tagger
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: jamatos
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-05 20:40:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2037527    
Bug Blocks:    

Description Marian Rehak 2022-01-05 20:09:25 UTC
nltk is vulnerable to ReDoS attack because of ^-?[0-9]+(.[0-9]+)?$ regex. If attacker succeeds to use malicious payload against RegexpTagger used in function get_pos_tagger and malt_regex_tagger, it will cause a nasty DoS.

External Reference:

https://huntr.dev/bounties/761a761e-2be2-430a-8d92-6f74ffe9866a
https://github.com/nltk/nltk/commit/2a50a3edc9d35f57ae42a921c621edc160877f4d

Comment 1 Marian Rehak 2022-01-05 20:09:41 UTC
Created python-nltk tracking bugs for this issue:

Affects: fedora-all [bug 2037527]

Comment 2 Product Security DevOps Team 2022-01-05 20:40:45 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.