valid-data-url@0.1.2 vulnerabilities

Detect if a string is a data URL

Direct Vulnerabilities

Known vulnerabilities in the valid-data-url 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)

valid-data-url is a universal validation plugin.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. It used a regular expression (^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$) in order to validate data URLs. This can cause an impact of about 10 seconds matching time for data 70k characters long.

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

Upgrade valid-data-url to version 0.1.5 or higher.

<0.1.5