CVE-2021-3838CWE-502

PHAR Deserialization in dompdf/dompdf

Critical · published November 15, 2024

CVSS v3.0
9.8
EPSS
1%
Percentile
72.9
In the wild
Unconfirmed
What it is

🚨 A sneaky PHAR deserialization vulnerability lurks in DomPDF versions before 2.0.0! An attacker can upload a seemingly harmless file and execute arbitrary PHP code — yikes! 🔥 Think of it like someone sneaking a dangerous package into a library that's supposed to be checking for explosives. Instead of verifying the contents, the librarian just opens it up, unleashing chaos instead of new books! This exploits a lack of protocol checks, allowing attackers to take control of your server. Imagine a malicious intruder waltzing into your system, reading your data, changing settings, or even destroying everything — it’s absolutely devastating! If you're using frameworks like Laravel with known vulnerabilities, the risk skyrockets!

Put simply

Think of it like someone sneaking a dangerous package into a library that's supposed to be checking for explosives. Instead of verifying the contents, the librarian just opens it up, unleashing chaos instead of new books! The flaw allows unauthorized file uploads that can utilize the phar:// protocol in the file_get_contents() function, enabling attackers to unserialize malicious files and instantiate arbitrary PHP objects. This could lead to full remote code execution, putting your application at grave risk.

What to do

This exploits a lack of protocol checks, allowing attackers to take control of your server. Imagine a malicious intruder waltzing into your system, reading your data, changing settings, or even destroying everything — it’s absolutely devastating! If you're using frameworks like Laravel with known vulnerabilities, the risk skyrockets! Upgrade to DomPDF version 2.0.0 or later immediately to eliminate this vulnerability. Additionally, implement strict file validation on uploads and avoid allowing arbitrary file types. Regularly audit your code for any potential insecure code patterns! You've got this! Follow these steps to lock it down and keep your application safe! 🛡️

The record
Technical detail
CVSS v3.0
9.8 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01432 · 72.9th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2024-11-15T10:51Z
EPSS history
Timeline
  • 15 NOV 10:51Z
    PHAR Deserialization in dompdf/dompdf
    cvelistv5