Public vulnerability disclosure

CVE-2026-121577

Unescaped header separators in whatstk build a regular expression that backtracks exponentially

publishedCWE-1333

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.

Technical severity6.7 mediumCVSS 4.0 · CNA: Secur0
Published2026-11-03Source updated 2026-11-03
Collected2026-11-031 attributed source

Fixes and workarounds

Fix

Upgrade to whatstk 0.9.0 or later.

Source: CNA: Secur0

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: Secur0

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: Secur0

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
whatstk
lucasrodes
whatstk
https://pypi.org
≥ 0.2.0; < 0.9.0 (affected, semver)
Other versions: unaffected
CNA: Secur0

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
4.0 / 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:NCNA: Secur0

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide