Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXJjNzcteHhxNi00bWZm
Command Injection in hot-formula-parser
Versions of hot-formula-parser
prior to 3.0.1 are vulnerable to Command Injection. The package fails to sanitize values passed to the parse
function and concatenates it in an eval
call. If a value of the formula is supplied by user-controlled input it may allow attackers to run arbitrary commands in the server.
Parsing the following formula creates a test
file in the present directory:
"SUM([(function(){require('child_process').execSync('touch test')})(),2])"
Recommendation
Upgrade to version 3.0.1 or later.
Permalink: https://github.com/advisories/GHSA-rc77-xxq6-4mffJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXJjNzcteHhxNi00bWZm
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: over 4 years ago
Updated: about 2 years ago
CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Percentage: 0.00266
EPSS Percentile: 0.67213
Identifiers: GHSA-rc77-xxq6-4mff, CVE-2020-6836
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-6836
- https://github.com/handsontable/formula-parser/pull/58
- https://github.com/handsontable/formula-parser/commit/396b089738d4bf30eb570a4fe6a188affa95cd5e
- https://blog.truesec.com/2020/01/17/reverse-shell-through-a-node-js-math-parser/
- https://www.npmjs.com/advisories/1439
- https://github.com/advisories/GHSA-rc77-xxq6-4mff
Blast Radius: 27.7
Affected Packages
npm:hot-formula-parser
Dependent packages: 70Dependent repositories: 674
Downloads: 240,151 last month
Affected Version Ranges: < 3.0.1
Fixed in: 3.0.1
All affected versions: 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17, 1.0.18, 1.0.19, 1.0.20, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 3.0.0
All unaffected versions: 3.0.1, 3.0.2, 4.0.0