/

CVE-2026-110646

Severity:

HIGH RISK

(8.1)

OS Command Injection (CWE-78) in Beganovich snappdf

CVE-2026-110646

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Beganovich snappdf contains an OS command injection vulnerability on Windows because attacker-influenced rendered URL data can reach command execution without adequate escaping. Under conditions where an attacker can control the value passed to setUrl(), command syntax may be interpreted by the PHP process, potentially allowing arbitrary command execution.

Beganovich snappdf contains an OS command injection vulnerability on Windows because attacker-influenced rendered URL data can reach command execution without adequate escaping. Under conditions where an attacker can control the value passed to setUrl(), command syntax may be interpreted by the PHP process, potentially allowing arbitrary command execution.

Affected context

The vulnerability occurs in Windows deployments of snappdf versions before 6.1.0 when a rendered URL or related setUrl() value can be influenced by an untrusted party. The affected execution path passes that value to executeOnWindows(), which invokes PHP exec() without sufficiently separating URL data from operating-system command syntax.

The vulnerability occurs in Windows deployments of snappdf versions before 6.1.0 when a rendered URL or related setUrl() value can be influenced by an untrusted party. The affected execution path passes that value to executeOnWindows(), which invokes PHP exec() without sufficiently separating URL data from operating-system command syntax.

Exploit preconditions

  • Attack surface: URL rendering and Windows command execution - Required access: Ability to influence the value supplied to setUrl(), either

directly or through an application feature that constructs the rendered URL

  • Trigger point: Processing the attacker-influenced URL through the Windows

execution path

  • Why exploitation is possible: Untrusted input reaches a shell command

context without adequate argument isolation or metacharacter handling

  • Attack surface: URL rendering and Windows command execution - Required access: Ability to influence the value supplied to setUrl(), either

directly or through an application feature that constructs the rendered URL

  • Trigger point: Processing the attacker-influenced URL through the Windows

execution path

  • Why exploitation is possible: Untrusted input reaches a shell command

context without adequate argument isolation or metacharacter handling

Why this happens

The underlying bug is command construction from attacker-controlled input. executeOnWindows() passes a value derived from setUrl() to PHP exec() without applying a safe command-building strategy or ensuring that the value is treated strictly as data. This behavior maps to CWE-78, where externally influenced input can alter the structure of an operating-system command.

The underlying bug is command construction from attacker-controlled input. executeOnWindows() passes a value derived from setUrl() to PHP exec() without applying a safe command-building strategy or ensuring that the value is treated strictly as data. This behavior maps to CWE-78, where externally influenced input can alter the structure of an operating-system command.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the PHP process.
  • The application environment could be modified or compromised.
  • Confidential files or rendered content may be accessed.
  • Malware, persistence mechanisms, or additional tooling could be introduced.
  • A compromised process could be used for lateral movement, depending on its permissions and network access.
  • An attacker may execute arbitrary commands with the privileges of the PHP process.
  • The application environment could be modified or compromised.
  • Confidential files or rendered content may be accessed.
  • Malware, persistence mechanisms, or additional tooling could be introduced.
  • A compromised process could be used for lateral movement, depending on its permissions and network access.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from the URL rendering workflow. Secure-by-default patterns include avoiding shell commands for process invocation where library or direct API alternatives exist, passing arguments through APIs that preserve argument boundaries, and treating URLs as data rather than command fragments. Input trust should be reduced through strict URL parsing, allowlisted schemes and destinations, canonical validation, and rejection of unexpected control characters. The PHP process and any helper processes should run with least privilege, restricted filesystem access, limited network permissions, and appropriate isolation.

Mitigation generally focuses on removing shell interpretation from the URL rendering workflow. Secure-by-default patterns include avoiding shell commands for process invocation where library or direct API alternatives exist, passing arguments through APIs that preserve argument boundaries, and treating URLs as data rather than command fragments. Input trust should be reduced through strict URL parsing, allowlisted schemes and destinations, canonical validation, and rejection of unexpected control characters. The PHP process and any helper processes should run with least privilege, restricted filesystem access, limited network permissions, and appropriate isolation.

How teams detect issues like this

Detection can include static analysis for flows from URL setters, request parameters, or rendered content into exec(), shell invocation APIs, or dynamically constructed command strings. Code review should look for string concatenation in process commands, missing argument boundary controls, and platform-specific execution branches that handle Windows metacharacters inconsistently. Runtime monitoring can alert on unexpected child processes created by the PHP service, while policy enforcement can require approved process-launch APIs and security review for shell execution. Automated security review tools may help identify these data flows.

Detection can include static analysis for flows from URL setters, request parameters, or rendered content into exec(), shell invocation APIs, or dynamically constructed command strings. Code review should look for string concatenation in process commands, missing argument boundary controls, and platform-specific execution branches that handle Windows metacharacters inconsistently. Runtime monitoring can alert on unexpected child processes created by the PHP service, while policy enforcement can require approved process-launch APIs and security review for shell execution. Automated security review tools may help identify these data flows.

Sources

SourceLink
github.comgithub.com/beganovich/snappdf/blob/v6.0.0/src/Snappdf.php#L280-L284
github.comgithub.com/beganovich/snappdf/commit/5197bd3bcc4df44e17246dbceea9ce51eb390eae
github.comgithub.com/beganovich/snappdf/pull/54
github.comgithub.com/beganovich/snappdf/releases/tag/v6.1.0
vulncheck.comvulncheck.com/advisories/beganovich-snappdf-1.1.0-before-6.1.0-os-command-injection-on-windows-via-seturl

Frequently asked

questions

It may be exploitable through a remote application feature when an attacker can influence the URL or value passed to setUrl() and the application processes it on Windows. Exploitability depends on how the application exposes and validates that input.

The attacker needs a path to control the relevant rendered URL data. This could be direct input access or indirect access through a feature that constructs the setUrl() value.

Avoid invoking a shell for URL rendering or process execution. Where process invocation is necessary, use a direct API with fixed executable paths and separately bound, validated arguments rather than concatenated command strings.

Treat URL and request-derived values as untrusted, enforce strict allowlists and canonical validation, test Windows-specific execution paths, and monitor services for unexpected child-process creation.

It may be exploitable through a remote application feature when an attacker can influence the URL or value passed to setUrl() and the application processes it on Windows. Exploitability depends on how the application exposes and validates that input.

The attacker needs a path to control the relevant rendered URL data. This could be direct input access or indirect access through a feature that constructs the setUrl() value.

Avoid invoking a shell for URL rendering or process execution. Where process invocation is necessary, use a direct API with fixed executable paths and separately bound, validated arguments rather than concatenated command strings.

Treat URL and request-derived values as untrusted, enforce strict allowlists and canonical validation, test Windows-specific execution paths, and monitor services for unexpected child-process creation.

Find out what's already
exploitable in your codebase.