Cyber Resilience

CVE-2023-50252

Deserialization in Dompdf Php-Svg-Lib ≤ 0.5.1

Public PoCDeserialization
Published
12 December 2023
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 8.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
EPSS Score 0.24 98th percentile
Risk Priority 74 floored blend · peak EPSS

Summary

CVE-2023-50252 is a high-severity External Control of System or Configuration Setting (CWE-15) vulnerability in Dompdf Php-Svg-Lib. Its CVSS base score is 8.3 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Path Interception by PATH Environment Variable (T1574.007); ranked in the top 2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

php-svg-lib is an SVG file parsing and rendering library that prior to version 0.5.1 contained a flaw in its handling of <use> tags referencing <image> tags. The library merges attributes from the <use> element onto the referenced <image> element without sanitizing the href attribute, which can result in an unsafe file read that triggers PHAR deserialization when the library is used with PHP versions earlier than 8. The issue is tracked under CWE-15 and CWE-502 and carries a CVSS 3.1 score of 8.3.

An unauthenticated remote attacker can supply a crafted SVG document containing a malicious <use> reference. When the document is processed by a vulnerable application, the attacker can cause arbitrary file reads on the server and potentially execute code through PHP object deserialization, all without user interaction.

The project addressed the flaw in release 0.5.1; the corresponding patch is available in commit 08ce6a96d63ad7216315fae34a61c886dd2dc030 and is described in GitHub Security Advisory GHSA-jq98-9543-m4cr. The EPSS score has remained essentially flat near 0.1 with no material post-disclosure increase.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

php-svg-lib is an SVG file parsing / rendering library. Prior to version 0.5.1, when handling `<use>` tag that references an `<image>` tag, it merges the attributes from the `<use>` tag to the `<image>` tag. The problem pops up especially when…

more

the `href` attribute from the `<use>` tag has not been sanitized. This can lead to an unsafe file read that can cause PHAR Deserialization vulnerability in PHP prior to version 8. Version 0.5.1 contains a patch for this issue.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1574.007 Path Interception by PATH Environment Variable Stealth
Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1547.004 Winlogon Helper DLL Persistence
Adversaries may abuse features of Winlogon to execute DLLs and/or executables when a user logs in.
T1547.014 Active Setup Persistence
Adversaries may achieve persistence by adding a Registry key to the Active Setup of the local machine.
T1574 Hijack Execution Flow Stealth
Adversaries may execute their own malicious payloads by hijacking the way operating systems run programs.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-50251Same product: Dompdf Php-Svg-Lib
CVE-2024-25117Same product: Dompdf Php-Svg-Lib
CVE-2024-39793Shared CWE-15
CVE-2025-13091Shared CWE-15
CVE-2025-27889Shared CWE-15
CVE-2024-39602Shared CWE-15
CVE-2025-41452Shared CWE-15
CVE-2026-21422Shared CWE-15
CVE-2025-43792Shared CWE-15
CVE-2024-39794Shared CWE-15

Affected Assets

dompdf
php-svg-lib
≤ 0.5.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 4 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-502

Penetration testing supplies malicious serialized objects, detecting unsafe deserialization and supporting corrective actions.

addresses: CWE-15

The policy and procedures establish internal controls and change management for system configuration settings, reducing the feasibility of external unauthorized modifications.

addresses: CWE-15

Baseline configuration under change control directly prevents unauthorized external modification of system or configuration settings.

addresses: CWE-15

Requires approval, documentation, and security impact review of all configuration changes, directly preventing unauthorized external control of system settings.

addresses: CWE-15

Impact analysis of configuration changes reduces the risk of deploying settings that permit unauthorized external control.

addresses: CWE-15

Restricting changes to system and configuration settings prevents external entities from controlling those settings without approval.

addresses: CWE-15

Establishing, implementing, approving deviations from, and monitoring configuration settings directly prevents external or unauthorized control of system settings.

addresses: CWE-15

The plan defines processes for identifying and managing configuration items, preventing external unauthorized control of system settings.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-01 mostly match
prevents

Hardened configuration baselines and change controls directly limit external manipulation of settings.

ID.RA-07 partial match
prevents

Formal change and exception management catches externally driven configuration alterations.

PR.AA-05 partial match
prevents

Least-privilege access policies reduce unauthorized external modification of configuration values.

PR.PS-02 none match
prevents

PR.PS-02 addresses only post-deployment updates/patching and cannot prevent introduction of unsafe deserialization code, yet it can remediate some instances when the flaw exists in outdated libraries or components.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

degrades

Configuration management directly prevents external tampering with system settings.

prevents

Access rights assignment determines who may change system settings.

prevents

Privileged access rights reduce the number of users who can alter configuration.

finds

Security testing includes validation of deserialization routines and the use of untrusted data, reducing the likelihood that unsafe object reconstruction will be deployed.

prevents

Information access restriction limits who can view or modify configuration data.

prevents

Change management enforces controlled, authorized modifications to settings.

References