Security 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.25 98th percentile
Risk Priority 74 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

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 Startup Items (T1037.005); 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

MITRE ATT&CK v20.0

T1037.005 Startup Items Persistence
Adversaries may use startup items automatically executed at boot initialization to establish persistence.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1112 Modify Registry Defense Impairment
Adversaries may interact with the Windows Registry as part of a variety of other techniques to aid in defense evasion, persistence, and execution.
T1137.002 Office Test Persistence
Adversaries may abuse the Microsoft Office "Office Test" Registry key to obtain persistence on a compromised system.
T1137.004 Outlook Home Page Persistence
Adversaries may abuse Microsoft Outlook's Home Page feature to obtain persistence on a compromised system.
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.
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-39794Shared CWE-15
CVE-2024-39790Shared CWE-15
CVE-2026-35650Shared CWE-15
CVE-2023-32349Shared CWE-15
CVE-2026-0232Shared CWE-15
CVE-2026-22750Shared CWE-15
CVE-2024-39280Shared CWE-15
CVE-2026-121427Shared 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

Our mappings. 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)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-01 mostly match
blocks

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

ID.RA-07 partial match
blocks

Formal change and exception management catches externally driven configuration alterations.

PR.AA-05 partial match
blocks

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

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

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

blocks

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

finds

A.8.29's combined programme of code review, vulnerability scanning, and penetration testing discovers externally-controlled configuration settings in both first-party code and acquired products, but a nameable remainder exists in settings that are only exploitable through complex, multi-step attack chains that standard penetration testing may not uncover.

blocks

Configuration management directly prevents external tampering with system settings.

prevents

Training developers about secure coding practices can reduce instances where they pass untrusted input directly to system configuration functions (sethostid, setCatalog, etc.), but this is an implementation-level defect that depends on developer skill and attention; the practice is fallible and a different clause (e.g., A.8.28 secure coding, A.8.29 security testing) carries the stronger effect, matching the A.6.3 -> CWE-598 anchor.

blocks

Use of privileged utility programs is controlled to prevent misuse of configuration tools.

prevents

A.8.28's secure coding principles (threat modelling, secure design, prohibited insecure techniques, analysis of common programming errors) directly target the pattern of allowing external input to govern system settings, but the control mandates a practice whose effect depends on developer rigour, so it catches a minority of instances the way it does for CWE-502 and CWE-79.

References