Technical impact
The vulnerability resides in the generate_regex() function of whatstk, where each %x code is expanded into a named capture group while other header characters remain unescaped. A header that contains regex metacharacters such as +, *, |, or ?, or even special separators like ^ and $, can inadvertently modify the regular expression’s structure. This causes the regex engine to perform an exponential backtrack or produce errors that are not caught by the library. As a result, parsing a typical chat export file can consume an unbounded amount of CPU resources or throw uncaught exceptions, leading to denial of service within the application. The weakness is classified as CWE‑1333.
Affected Systems
The issue affects the whatstk tool produced by lucasrodes, specifically versions 0.2.0 through 0.8.x. The recommended fix is to upgrade to version 0.9.0 or later, where the header regex construction has been corrected to properly escape separators.
Risk and Exploitability
The CVSS score of 6.7 indicates moderate severity. The EPSS score is not reported, and the vulnerability is not listed in the CISA KEV catalog. An attacker can trigger the exploitation by supplying a crafted chat export file that includes a header with unescaped metacharacters. The tool’s default header auto‑detection will use the separator directly from the file, meaning an attacker can repeatedly load such a file to exhaust the CPU of the component performing the parse. Because the vulnerability manifests as a resource depletion rather than privilege escalation or information disclosure, the impact is limited to availability and potential performance degradation of systems that rely on whatstk for processing WhatsApp chat exports.