Skip to content

Command Injection in hot-formula-parser

Critical severity GitHub Reviewed Published May 6, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm hot-formula-parser (npm)

Affected versions

< 3.0.1

Patched versions

3.0.1

Description

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.

References

Reviewed May 6, 2020
Published to the GitHub Advisory Database May 6, 2020
Last updated Jan 9, 2023

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2020-6836

GHSA ID

GHSA-rc77-xxq6-4mff
Checking history
See something to contribute? Suggest improvements for this vulnerability.