Vulnerability library
Security checkJune 26, 2026

LinkifyIt#match scan loop has quadratic algorithmic complexity

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

High severitynpmlinkify-it

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

LinkifyIt.prototype.match — the package’s primary public API — has O(N²) algorithmic complexity for inputs containing many fuzzy links or emails. This is not a regex backtrack bug; it’s a structural issue in the JS-level scan loop that re-slices the input and re-runs unanchored regex searches on progressively shorter tails, N times.

Recommendation

Update the linkify-it package to the latest compatible version. Followings are version details:

  • Affected version(s): <= 5.0.0
  • Patched version(s): 5.0.1

References

Could your website be exposed too?

SmartScanner can check your website for LinkifyIt#match scan loop has quadratic algorithmic complexity and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated June 26, 2026