Command Injection Affecting find-exec package, versions <1.0.3


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.18% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FINDEXEC-5876637
  • published31 Aug 2023
  • disclosed30 Aug 2023
  • creditMiguel Monteiro

Introduced: 30 Aug 2023

CVE-2023-40582  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade find-exec to version 1.0.3 or higher.

Overview

find-exec is a Finds first available shell command from a list.

Affected versions of this package are vulnerable to Command Injection via the isExec function due to missing shell-quote, allowing attackers to run malicious commands.

PoC

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

References

CVSS Scores

version 3.1