CVE-2026-121577
Received Received - Intake

Inefficient Regular Expression Complexity in whatstk

Vulnerability report for CVE-2026-121577, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-03

Last updated on: 2026-11-03

Assigner: Secur0

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-03
Last Modified
2026-11-03
Generated
2026-11-03
AI Q&A
2026-11-03
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
lucasrodes whatstk 0.2.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1333 The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an inefficient regular expression complexity issue in the whatstk library. It occurs in the generate_regex() function where the header regular expression is built by replacing format codes with named capture groups without properly escaping other characters. This allows a malicious chat export file to cause the parsing process to consume excessive CPU time by exploiting regex metacharacters in date separators.

Detection Guidance

This vulnerability is specific to the whatstk library and involves inefficient regex parsing. To detect it, check if your system has the whatstk library installed, particularly versions 0.2.0 to 0.9.0. Run: pip show whatstk. If installed, verify the version. Monitor CPU usage during file parsing operations, especially when processing chat export files with unusual date separators.

Impact Analysis

This vulnerability can impact you by causing system slowdowns or complete hangs when processing certain chat export files. An attacker could craft a malicious file that triggers unbounded CPU consumption during parsing, potentially leading to denial of service or system unresponsiveness.

Mitigation Strategies

Upgrade the whatstk library to version 0.9.0 or later. Run: pip install --upgrade whatstk. If upgrading is not possible, disable header auto-detection by parsing chat exports with a fixed header format. Avoid using untrusted chat export files until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-121577. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...