Live threats

All CVEs / Knplabs

CVE-2023-28115Knplabs Snappy

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
3.7%
probability of exploitation in 30 days · percentile 91
Auth required
No
Published
Mar 17, 2023
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-502
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Prior to version 1.4.2, Snappy is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the `file_exists()` function. If an attacker can upload files of any type to the server he can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution especially when snappy is used with frameworks with documented POP chains like Laravel/Symfony vulnerable developer code. If a user can control the output file from the `generateFromHtml()` function, it will invoke deserialization. This vulnerability is capable of remote code execution if Snappy is used with frameworks or developer code with vulnerable POP chains. It has been fixed in version 1.4.2.

Original NVD text.

What to do

  1. Apply the vendor's security update for Snappy.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist knplabs/knp-snappy < 1.4.2 1.4.2 composer require "knplabs/knp-snappy:^1.4.2"

Per OSV / GitHub Advisories (GHSA-gq6w-q6wh-jggc). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
knplabssnappy< 1.4.2

Official sources

References

Links published by the sources. Open them with care.