CVE-2016-10548: Reduce css calc Arbitrary Code Injection Vulnerability
CRITICALCVE-2016-10548 is a CRITICAL arbitrary code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Reduce css calc libraries in the npm ecosystem. The issue involves arbitrary code injection in reduce-css-calc. Remediation is available by upgrading affected packages to version 1.2.5.
CVE-2016-10548 at a Glance
How to Fix CVE-2016-10548
To remediate this vulnerability, upgrade all affected Reduce css calc 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 reduce-css-calc@1.2.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls reduce-css-calc
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-10548, inspect your project dependencies using npm:
npm ls reduce-css-calc
Analyze the terminal output to locate any version of Reduce css calc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.5), your application is affected.
Note: The npm ls reduce-css-calc 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Reduce css calc, 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-2016-10548 Affected Reduce css calc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
reduce-css-calc
|
npm |
< 1.2.5
|
1.2.5
|
References
Frequently Asked Questions
What is CVE-2016-10548?
Which Reduce css calc versions are affected?
What version fixes CVE-2016-10548?
Is reduce-css-calc affected?
What CWE is associated with CVE-2016-10548?
How can I check npm dependencies for CVE-2016-10548?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4662-j96g-mv46",
"modified" : "2020-08-31T18:12:20Z",
"published" : "2018-06-07T19:43:06Z",
"aliases" : [ "CVE-2016-10548" ],
"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.\n\n## Proof of Concept\n\n```\nconst reduceCSSCalc = require('reduce-css-calc');\nconsole.log(reduceCSSCalc(`calc( (Buffer(10000)))`));\nconsole.log(reduceCSSCalc(`calc( (global['fs'] = require('fs')))`));\nconsole.log(reduceCSSCalc(`calc( (fs['readFileSync'](\"/etc/passwd\", \"utf-8\")))`));\n```\n\n\n\n## Recommendation\n\nUpdate to version 1.2.5 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "reduce-css-calc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.5"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:57:38Z",
"nvd_published_at" : null
}
}