CVE-2017-16138 mime Regular Expression Denial of Service when MIME lookup performed on untrusted user input

High 7.5 Published Updated

Attackers can cause denial of service in applications using the mime library by triggering expensive regular expression operations with untrusted input.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-16138?

CVE-2017-16138 is a high-severity denial of service vulnerability in HackerOne mime node module, published on 7 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The mime module < 1.4.1, 2.0.1, 2.0.2 is vulnerable to regular expression denial of service when a mime lookup is performed on untrusted user input.

Weakness: CWE-400

Which versions are affected by CVE-2017-16138?

4 open source packages ship an affected version, including mime. It affects 1 product.

PackageAffectedFixed in
mime npmAll versions1.4.1
mime npmAll versions1.4.1
mime npmFrom 2.0.02.0.3
mime npmFrom 2.0.02.0.3

Products include Mime Project Mime.

How do I fix CVE-2017-16138?

Upgrade mime to a fixed version for your release line: 1.4.1 or 2.0.3.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2017-16138 being exploited?

There is no known exploitation of CVE-2017-16138 in the wild and no public exploit code.

Sources

Also known as CLSA-2026-1774398061, CLSA-2026-1781484843, CLSA-2026-1781484844, CLSA-2026-1784682759, CLSA-2026-1784769496, CLSA-2026-1792767387 and 4 more.

Is CVE-2017-16138 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free