GitHub Advisoryadvisory · npm

GHSA-95rp-6gqp-6622 Command Injection Vulnerability in find-exec

CRITICAL Published 2023-08-30 Modified 2023-08-30 Official page ↗
Aliases
CVE-2023-40582
Ecosystem
npm
Packages
find-exec
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-78
Reviewed
2023-08-30

Affected packages

• npm find-exec: < 1.0.3 → fixed in 1.0.3

Description

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.

Related

Alias · CVE (1)

  • CVE-2023-40582 find-exec is a utility to discover available shell commands. vulnerability

Weakness · CWE (1)

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness

References