Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-46683
Published:June 01, 2026
Updated:June 01, 2026
Impact It impacts applications where: - the PHP daemon run with root permissions ; - the application is either running outside a container or has sensitive file access ; It could happens with this kind of workflows: $stylesheet = $_GET['stylesheet']; // = ‘file:///etc/passwd’ $pdf = new Knp\Snappy\Pdf(‘/usr/local/bin/wkhtmltopdf’); $pdf->generate(‘page.html’, ‘out.pdf’, [ ‘xsl-style-sheet’ => $stylesheet ]); Patches A list a schema with "http" and "https" by default is used to validate the remote path by default. Workarounds Developers should ensure usage cannot allow (in any case) a user to pass a free input directly to the Snappy library. // Bad example $pdf = new Knp\Snappy\Pdf(‘/usr/local/bin/wkhtmltopdf’); $pdf->generate(‘page.html’, ‘out.pdf’, [ ‘xsl-style-sheet’ => $_GET['input'], ]); Instead developers can list available available stylesheets and pick the right one with the user input. // Better $allowedStylesheets = [ 'invoice' => '/app/xsl/invoice.xsl', 'report' => '/app/xsl/report.xsl', ]; $key = $_GET['stylesheet'] ?? ''; if (!array_key_exists($key, $allowedStylesheets)) { throw new \RuntimeException('Unknown stylesheet.'); } $pdf = new Knp\Snappy\Pdf('/usr/local/bin/wkhtmltopdf'); $pdf->generate('page.html', 'out.pdf', [ 'xsl-style-sheet' => $allowedStylesheets[$key], ]); References Read more about SSRF at "owasp.org/www-community/attacks/Server_Side_Request_Forgery" (https://owasp.org/www-community/attacks/Server_Side_Request_Forgery)
Affected Packages
https://github.com/KnpLabs/snappy.git (GITHUB):
Affected version(s) >=v0.5.0 <v1.7.0
Fix Suggestion:
Update to version v1.7.0
knplabs/knp-snappy (PHP):
Affected version(s) >=v0.5.0 <v1.7.0
Fix Suggestion:
Update to version v1.7.0
knplabs/knp-snappy (PHP):
Affected version(s) >=dev-add_phpcsfixer <v1.7.0
Fix Suggestion:
Update to version v1.7.0
Do you need more information?
Contact Us
CVSS v4
Base Score:
6.9
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
LOW
Subsequent System Integrity
LOW
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
CHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Weakness Type (CWE)
Server-Side Request Forgery (SSRF)