content-type-parser@1.0.0 vulnerabilities

Parse the value of the Content-Type header

Direct Vulnerabilities

Known vulnerabilities in the content-type-parser 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)

content-type-parser is a Parse the value of the Content-Type header. content-type-parser package has been replaced by whatwg-mimetype.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). It used a regular expression (/^(.*?)\/(.*?)([\t ]*;.*)?$/) in order to parse user agents. This can cause a very moderate impact of about 4 seconds matching time for data 30k characters long.

Note: content-type-parser has been replaced by the whatwg-mimetype package and the fix for this vulnerability can be found within whatwg-mimetype.

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

There is no fixed version for content-type-parser.

*