Inefficient Algorithmic Complexity Affecting @chenglou/pretext package, versions <0.0.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-CHENGLOUPRETEXT-16321421
  • published29 Apr 2026
  • disclosed8 Apr 2026
  • creditNapongiZero

Introduced: 8 Apr 2026

CVE NOT AVAILABLE CWE-407  (opens in a new tab)

How to fix?

Upgrade @chenglou/pretext to version 0.0.5 or higher.

Overview

@chenglou/pretext is a Fast, accurate & comprehensive text measurement & layout

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity through the isRepeatedSingleCharRun function during text analysis. An attacker can cause significant performance degradation and block the main thread by submitting large inputs consisting of repeated identical punctuation characters.

CVSS Base Scores

version 4.0
version 3.1