Command Injection Affecting knplabs/knp-snappy package, versions <1.7.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

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-PHP-KNPLABSKNPSNAPPY-16875112
  • published26 May 2026
  • disclosed21 May 2026
  • creditUnknown

Introduced: 21 May 2026

NewCVE-2026-46643  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade knplabs/knp-snappy to version 1.7.1 or higher.

Overview

Affected versions of this package are vulnerable to Command Injection via the constructor when the binary path is sourced from user-influenced configuration, environment variables derived from request data, or concatenated with user-controlled fragments. An attacker can execute arbitrary commands as the PHP process by supplying a crafted binary path value.

Workaround

This vulnerability can be mitigated by verifying that the binary path is executable using is_executable($path) before passing it to the constructor.

CVSS Base Scores

version 4.0
version 3.1