Command Injection in hot-formula-parser
Critical severity
GitHub Reviewed
Published
May 6, 2020
to the GitHub Advisory Database
•
Updated Jan 9, 2023
Description
Reviewed
May 6, 2020
Published to the GitHub Advisory Database
May 6, 2020
Last updated
Jan 9, 2023
Versions of
hot-formula-parser
prior to 3.0.1 are vulnerable to Command Injection. The package fails to sanitize values passed to theparse
function and concatenates it in aneval
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