Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. linkify-it
  4. ›
  5. CVE-2026-59887

CVE-2026-59887: linkify-it: Quadratic-complexity DoS via the `mailto:` validator scan-loop on attacker text

July 21, 2026

linkify-it’s schema-scan loop (.test() / .match(), the documented public API) invokes the mailto: schema validator at every mailto: occurrence in the input text. For each occurrence the validator does text.slice(pos) (an O(n) copy) and runs an email regex whose local-part class src_email_name greedily scans the entire remaining tail (O(n)) before failing. With N mailto: occurrences that is N × O(n) = O(n²). Because linkify-it runs on arbitrary user text (markdown-it feeds it whole documents when linkify:true), an unauthenticated attacker can block the single-threaded event loop for many seconds with a small input. No length bound (unlike an HTTP header).

References

  • github.com/advisories/GHSA-v245-v573-v5vm
  • github.com/markdown-it/linkify-it/commit/105e5d77f7d119871d2b2d86ed208568eb3e7ffe
  • github.com/markdown-it/linkify-it/releases/tag/5.0.2
  • github.com/markdown-it/linkify-it/security/advisories/GHSA-v245-v573-v5vm
  • nvd.nist.gov/vuln/detail/CVE-2026-59887

Code Behaviors & Features

Detect and mitigate CVE-2026-59887 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 5.0.2

Fixed versions

  • 5.0.2

Solution

Upgrade to version 5.0.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/linkify-it/CVE-2026-59887.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:43 +0000.