GHSA-rc77-xxq6-4mff

Suggest an improvement
Source
https://github.com/advisories/GHSA-rc77-xxq6-4mff
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/05/GHSA-rc77-xxq6-4mff/GHSA-rc77-xxq6-4mff.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rc77-xxq6-4mff
Aliases
Published
2020-05-06T19:32:33Z
Modified
2023-11-01T04:53:26.676612Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Command Injection in hot-formula-parser
Details

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.

Database specific
{
    "github_reviewed_at": "2020-05-06T19:32:05Z",
    "github_reviewed": true,
    "nvd_published_at": null,
    "severity": "CRITICAL",
    "cwe_ids": [
        "CWE-94"
    ]
}
References

Affected packages

npm / hot-formula-parser

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/05/GHSA-rc77-xxq6-4mff/GHSA-rc77-xxq6-4mff.json"