CVE-2023-28115Knplabs Snappy
Critical 9.8 No auth needed
Follow: this CVE · Knplabs · Knplabs Snappy We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Snappy.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| knplabs | snappy | < 1.4.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product
- github.com Patch
- github.com Patch
- github.com Patch
- github.com Release Notes
- github.com Exploit Vendor Advisory