CVE-2026-121577
Description
Inefficient Regular Expression Complexity (CWE-1333) in generate_regex() (whatstk/whatsapp/parser.py) in whatstk from 0.2.0 before 0.9.0 allows a party that supplies a chat export to consume the CPU of the process that parses it for an unbounded time, because the function builds the header regular expression by replacing each %x code with its named capture group and leaves every other character of the header format in the pattern unescaped. A header whose date separator is a regular expression metacharacter therefore alters the pattern instead of matching itself: a separator of + quantifies the preceding capture group, giving (?P<day>\d{1,2})+(?P<month>\d{1,2})+(?P<year>\d{2,4}), and a run of digits that cannot complete the header then makes the engine try every way of partitioning that run. Header auto detection is enabled by default and derives the format from the text of the file, so the separator is taken from the export itself and no header format has to be passed by the caller. Separators of (, ) and \ instead raise re.PatternError, separators of *, | and ? raise TypeError, and separators of ^ and $ raise KeyError, none of which the library catches. This results in the parse of a file of a few hundred bytes consuming CPU without completing, or in an uncaught exception in the calling program.
Weakness
- CWE-1333: Inefficient Regular Expression Complexity
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-11-06 |
Timeline
- 2026-11-03Published by the CNA19:52 UTC
- 2026-11-06CISA SSVC decision recorded3 days after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| lucasrodes whatstk | from 0.2.0 before 0.9.0fixed in 0.9.0 | 0.9.0 |
References
- https://github.com/lucasrodes/whatstk/commit/01d66d8
- https://github.com/lucasrodes/whatstk/pull/181
- https://github.com/lucasrodes/whatstk/releases/tag/v0.9.0
- https://secur0.com/en/cna/cve-list/cve-2026-121577-whatstk-header-regex-redos
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-121577'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-121577'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-121577'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-121577'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).