Unescaped header separators in whatstk build a regular expression that backtracks exponentially
Summary
| CVE | CVE-2026-121577 |
|---|---|
| State | PUBLISHED |
| Assigner | Secur0 |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-03 20:18:13 UTC |
| Updated | 2026-11-03 20:18:13 UTC |
| 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. |
Risk And Classification
Primary CVSS: v4.0 6.7 MEDIUM from 4daa8cea-433a-44bd-9456-53b127fc289a
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Problem Types: CWE-1333 | CWE-1333 CWE-1333 Inefficient Regular Expression Complexity
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | 4daa8cea-433a-44bd-9456-53b127fc289a | Secondary | 6.7 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/C... |
| 4.0 | CNA | CVSS | 6.7 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
CVSS v4.0 Breakdown
Attack Vector
LocalAttack Complexity
LowAttack Requirements
NonePrivileges Required
NoneUser Interaction
ActiveConfidentiality
NoneIntegrity
NoneAvailability
HighSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Lucasrodes | Whatstk | affected 0.2.0 0.9.0 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| secur0.com/en/cna/cve-list/cve-2026-121577-whatstk-header-regex-redos | 4daa8cea-433a-44bd-9456-53b127fc289a | secur0.com | |
| github.com/lucasrodes/whatstk/releases/tag/v0.9.0 | 4daa8cea-433a-44bd-9456-53b127fc289a | github.com | |
| github.com/lucasrodes/whatstk/pull/181 | 4daa8cea-433a-44bd-9456-53b127fc289a | github.com | |
| github.com/lucasrodes/whatstk/commit/01d66d8 | 4daa8cea-433a-44bd-9456-53b127fc289a | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: m.gongora.carriedo (en)
CNA: Xoán M. Otero Jorge (en)
CNA: Darío Rivas (en)
CNA: Secur0 CNA (en)
CNA: Lucas Rodés-Guirao (en)
Additional Advisory Data
Solutions
CNA: Upgrade to whatstk 0.9.0 or later.
There are currently no legacy QID mappings associated with this CVE.