CVE-2026-41247: Php Imagemagick Cli Sprintf Shell Injection

An ImageMagick CLI command is built with sprintf() and interpolates a value into a shell-quoted argument (e.g., "xc:%s" or -background "%s") without using escapeshellarg(). If the interpolated value is influenced by user input, an attacker can break out of the double-quoted argument with a literal " followed by shell metacharacters (`;`, `|`, `&&`, `$()`, ba

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0PHP
greprules fetch cve-2026-41247-php-imagemagick-cli-sprintf-shell-injection --engine opengrep

Description

An ImageMagick CLI command is built with sprintf() and interpolates a value into a shell-quoted argument (e.g., "xc:%s" or -background "%s") without using escapeshellarg(). If the interpolated value is influenced by user input, an attacker can break out of the double-quoted argument with a literal " followed by shell metacharacters (`;`, `|`, `&&`, `$()`, ba