Vulnerability library
Security checkApril 08, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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 scan

Related Issues

See something that needs correcting? Let us knowUpdated April 08, 2026