DOMPdf < 2.0.0 PHAR Deserialization RCE via file_get_contents
CVE-2021-3838 Published on November 15, 2024

PHAR Deserialization in dompdf/dompdf
DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server 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 DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.

NVD

Vulnerability Analysis

CVE-2021-3838 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. An automatable proof of concept (POC) exploit exists. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.

Attack Vector:
NETWORK
Attack Complexity:
LOW
Privileges Required:
NONE
User Interaction:
NONE
Scope:
UNCHANGED
Confidentiality Impact:
HIGH
Integrity Impact:
HIGH
Availability Impact:
HIGH

Weakness Type

What is a Marshaling, Unmarshaling Vulnerability?

The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.

CVE-2021-3838 has been classified to as a Marshaling, Unmarshaling vulnerability or weakness.


Products Associated with CVE-2021-3838

stack.watch emails you whenever new vulnerabilities are published in Canonical Ubuntu Linux or Dompdfproject Dompdf. Just hit a watch button to start following.

 
 

Affected Versions

dompdf/dompdf: dompdf:

Exploit Probability

EPSS
4.88%
Percentile
89.64%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.