slug@0.3.0 vulnerabilities

slugifies even utf-8 chars!

Direct Vulnerabilities

Known vulnerabilities in the slug package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Regular Expression Denial of Service (ReDoS)

slug is a package that slugifies every string.

Affected versions of this package are vulnerable to Regular expression Denial of Service (ReDoS). It uses the following regex /^\s+|\s+$/g in order to trim whitespaces, which can cause a slowdown of 2 seconds for 50k characters.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade slug to version 0.9.2 or higher.

<0.9.2