CVE-2023-41330CWE-502

Unsafe deserialization in knplabs/knp-snappy

Critical · published September 6, 2023

CVSS v3.1
9.8
EPSS
2%
Percentile
83.1
In the wild
Unconfirmed
What it is

🚨 A seemingly innocent file path can lead to a wild ride—remote code execution is just a `PHAR://` away! 🔥 Think of it like a sneaky delivery person who, instead of checking the address, just glances at the box label and delivers anything without verifying the contents—dangerous if the label says 'confidential!' An attacker could exploit this gap, gaining full control over your server, executing arbitrary code, and rummaging through your filesystem like a burglar with the master key. This could lead to data leaks, service disruptions, and an absolute nightmare for security!

Put simply

Think of it like a sneaky delivery person who, instead of checking the address, just glances at the box label and delivers anything without verifying the contents—dangerous if the label says 'confidential!' The vulnerability arises from a case-insensitive check allowing a crafted filename to trigger arbitrary PHAR deserialization when using the `generateFromHtml()` function—essentially, a malicious file can be executed if the user can control the file input and PHP is pre-8.0.

What to do

An attacker could exploit this gap, gaining full control over your server, executing arbitrary code, and rummaging through your filesystem like a burglar with the master key. This could lead to data leaks, service disruptions, and an absolute nightmare for security! Upgrade to version 1.4.3 immediately to patch this vulnerability. If upgrading isn't feasible, restrict access to the `AbstractGenerator->generate(...)` function to trusted users only, and monitor input for malicious filenames. 🔒 You've got this! With these steps, you'll be locking down your server in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.02287 · 83.1th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2023-09-06T17:33Z
EPSS history
Timeline
  • 06 SEP 17:33Z
    Unsafe deserialization in knplabs/knp-snappy
    cvelistv5