Vulnerabilities/

Pretext: Algorithmic Complexity (DoS) in the text analysis phase

Severity:
High

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:

References

Related Issues

Tags:
npm
@chenglou/pretext
Anything's wrong? Let us know Last updated on April 08, 2026