cbcvebase.
CVE-2023-28115
published 2023-03-17

CVE-2023-28115: 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…

PriorityP260critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
2.76%
84.4th percentile
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.

Affected

7 ranges
VendorProductVersion rangeFixed in
debiancivicrm
knplabsknp-snappy>= 0 < 1.4.21.4.2
knplabsknp-snappy>= 0 < 1.4.31.4.3
knplabssnappy< 1.4.21.4.2
knplabssnappy< 1.4.31.4.3
pontedilanaphp-weasyprint< 2.6.02.6.0
pontedilanaphp-weasyprint>= 0 < 2.6.02.6.0

Detection & IOCsextracted from sources · hover to see the quote

  • Detect use of phar:// protocol being passed into file_exists() calls within Snappy library context, which triggers PHAR deserialization
  • Monitor for attacker-controlled output file arguments to generateFromHtml() containing phar:// URI scheme, which will invoke deserialization
  • Flag any file upload followed by a phar:// protocol reference in application input, especially in environments using Laravel or Symfony POP chains alongside Snappy
  • ·Vulnerability only exploitable if attacker can upload arbitrary files to the server AND control input to Snappy functions; both conditions must be met for RCE
  • ·RCE impact is conditional on the presence of exploitable POP chains in co-deployed frameworks (e.g., Laravel, Symfony) or vulnerable developer code
  • ·Debian bullseye remains unpatched (open) as of the security tracker; fix is available only in Snappy version 1.4.2 and later

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
ghsa9.8CRITICAL
osv9.8CRITICAL
vendor_debian9.8CRITICAL
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.