mime Regular Expression Denial of Service when MIME lookup performed on untrusted user input

mime Updated 02 Oct 2025

Summary

20/07/2018
Yes i
High
7.5

CVE-2017-16138: mime Regular Expression Denial of Service when MIME lookup performed on untrusted user input. Affects mime across 2 version ranges.

< 1.4.1 >= 2.0.0, < 2.0.3

Fixed in 1.4.1 or 2.0.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2017-16138 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Affected versions of mime are vulnerable to regular expression denial of service when a mime lookup is performed on untrusted user input.

Recommendation

Update to version 2.0.3 or later.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.4.1 1.4.1
    npm install mime@1.4.1
  • >= 2.0.0, < 2.0.3 2.0.3
    npm install mime@2.0.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Share this vulnerability
Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.4.1 1.4.1
    npm install mime@1.4.1
  • >= 2.0.0, < 2.0.3 2.0.3
    npm install mime@2.0.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback