# CVE-2026-121577: Unescaped header separators in whatstk build a regular expression that backtracks exponentially

Status: published. Published: 2026-11-03. Updated: 2026-11-03.

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.

## Remediation

- 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) — https://github.com/lucasrodes/whatstk/pull/181
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: Secur0) — https://github.com/lucasrodes/whatstk/commit/01d66d8

## Affected products and versions

- lucasrodes / whatstk (whatstk): ≥ 0.2.0; < 0.9.0 (affected, semver). Source: CNA: Secur0

## Severity and prioritization

- CVSS 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:N; source: CNA: Secur0

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-1333

## Exploit evidence

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

## References

- https://github.com/lucasrodes/whatstk/pull/181 (CNA: Secur0; patch)

- https://github.com/lucasrodes/whatstk/commit/01d66d8 (CNA: Secur0; patch)

- https://github.com/lucasrodes/whatstk/releases/tag/v0.9.0 (CNA: Secur0; release-notes)

- https://secur0.com/en/cna/cve-list/cve-2026-121577-whatstk-header-regex-redos (CNA: Secur0; third-party-advisory, technical-description)

## Provenance

- CNA: Secur0: https://www.cve.org/CVERecord?id=CVE-2026-121577; retrieved 2026-11-03; source updated 2026-11-03

Revision: 4d818312c32c94ecc113a3cd4bf66d1cb9daf8b095c883e80d7f1363f3296d4c

Canonical: https://y2.dev/cve/CVE-2026-121577

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.