ismobilejs@0.3.9 vulnerabilities

A simple JS library that detects mobile devices.

Direct Vulnerabilities

Known vulnerabilities in the ismobilejs 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
  • H
Regular Expression Denial of Service (ReDoS)

ismobilejs is a simple JS library that detects mobile devices.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via multiple regular expression used for parsing the user agent.

For example: /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i

Multiple such regexs are checked against the user agent for 40.000 characters around 22 seconds matching time.

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

Upgrade ismobilejs to version 0.5.0 or higher.

<0.5.0