Description
isRepeatedSingleCharRun() in src/analysis.ts (line 285) re-scans the entire accumulated segment on every merge iteration during text analysis, producing O(n²) total work for input consisting of repeated identical punctuation characters.
Recommendation
Update the @chenglou/pretext package to the latest compatible version. Followings are version details:
- Affected version(s): <= 0.0.4
- Patched version(s): 0.0.5
References
Could your website be exposed too?
SmartScanner can check your website for Pretext: Algorithmic Complexity (DoS) in the text analysis phase and gives you actionable findings to investigate.
Start a free scanRelated Issues
- linkify-it: Quadratic-complexity DoS via the `mailto:` validator scan-loop on attacker text - CVE-2026-59887
- Open WebUI Unauthenticated Multipart Boundary Denial of Service (DoS) Vulnerability - Vulnerability
- LinkifyIt#match scan loop has quadratic algorithmic complexity - CVE-2026-48801
- node-opcua DoS vulnerability via message with memory allocation that exceeds v8's memory limit - CVE-2022-25231


