CVE-2026-121577
MediumCVSS 6.7Exploitation Probability (EPSS)
Low risk6th percentile - higher than 6% of all known CVEs
Summary
whatstk from 0.2.0 before 0.9.0 builds the header regular expression in generate_regex() without escaping format characters, so a date separator that is a regex metacharacter alters the pattern. A malicious chat export can cause unbounded CPU consumption during parsing or an uncaught exception in the calling program.
Risk Assessment
A chat export supplier can trigger a ReDoS attack, exhausting CPU of the parsing process and destabilizing the service.
Recommendation
Update whatstk to version 0.9.0 or later and consider restricting parsing of files from untrusted sources.
Other vulnerabilities in whatstk
See all- CVE-2026-142382Low
whatstk library versions 0.3.0 through 0.9.0 download sample chat files over HTTP (http scheme), allowing an attacker on the network path to substitute the file content before the redirect to HTTPS. The _str_from_file() function passes http-prefixed paths to urlopen(), and the first request travels in cleartext on port 80.
- CVE-2026-141426Low
Incorrect Default Permissions (CWE-276) in gdrive_init() in whatstk 0.5.0 before 0.9.0 causes ~/.config/whatstk/gdrive, client_secrets.json, and settings.yaml to be created with umask-derived permissions (0755/0644 by default), allowing other local users to read the Google Drive OAuth client secret.
- CVE-2026-121691Medium
In whatstk from 0.7.0 before 0.9.0, the ZIP loader does not bound the size of extracted members or check the compression ratio. A party supplying a chat export can exhaust the memory and disk of the parsing process, causing it to be killed.
- CVE-2026-121564Low
The whatstk library from 0.3.0 before 0.9.0 contains an incomplete comparison vulnerability (CWE-1023) in merge_chats() (whatstk/utils/chat_merge.py), reached from BaseChat.merge(). The merge keeps whole the chat whose first message is oldest and appends from the other only messages strictly newer than the last message of the first, so messages of the second chat falling within the first's date range are silently discarded. The merged result is returned without a warning and without a count of what was removed.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

