Intel

AIKIDO-2026-730615

slug is vulnerable to Cross-Site Scripting (XSS)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 25, 2026
July 25, 2026

59

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

The slugify function skips its disallowed-character sanitizer when the replacement option is set to an empty string. Because String.prototype.includes('') always returns true, every character takes the replacement-preserving branch and the final character-stripping filter never runs. As a result, characters such as < > " ' ( ) / and .. pass through unchanged instead of being removed, so output can carry markup or path-traversal sequences that the module normally strips. The fix guards that branch so an empty replacement falls through to the character filter.

How do I fix this?

Upgrade the slug library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you call slug with the replacement option set to an empty string.

Package

Versions

4.0.4 - 12.0.0

Fixed in 12.0.1

Background info

slug is vulnerable to Cross-Site Scripting (XSS) in versions 4.0.4 - 12.0.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea