The vulnerability stems from the discrepancy between how Dompdf's Cache.php and php-svg-lib's Image.php handle SVG attributes. Dompdf's code (pre-patch) only validated the first non-empty attribute between 'xlink:href' and 'href', while php-svg-lib's code would ultimately use 'href' if both were present. The anonymous function in Cache.php failed to validate both attributes independently, allowing attackers to bypass security checks by exploiting this parsing inconsistency.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| dompdf/dompdf | composer | = 2.0.2 | 2.0.3 |
xlink:hrefAn attacker can exploit the vulnerability to call arbitrary URLs with arbitrary protocols if they provide an SVG file to the Dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, which will lead, at the very least, to arbitrary file deletion and might lead to remote code execution, depending on available classes.
Ongoing coverage of React2Shell