Advisory

GHSA-95rp-6gqp-6622

Also known as: CVE-2023-40582

Summary

Command Injection Vulnerability in find-exec

Details

Older versions of the package are vulnerable to Command Injection as an attacker controlled parameter. As a result, attackers may run malicious commands.

For example:

const find = require("find-exec");
find("mplayer; touch hacked")

This creates a file named "hacked" on the filesystem.

You should never allow users to control commands to find, since this package attempts to run every command provided.

Thanks to @miguelafmonteiro for reporting.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2023-08-30 20:08 UTC
Modified
2023-11-08 04:13 UTC

Affected packages and fixes

find-exec

npm · All systems

Affected

  • introduced 0, fixed 1.0.3 (semver)

Fixed versions

1.0.3

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