cve.bz

CVE-2024-25117 dompdf php-svg-lib: External Control of File Name or Path

9.8 criticalEPSS 0.9%Fix available

Critical (9.8) in dompdf php-svg-lib. EPSS 0.9% estimated probability of exploitation activity in the next 30 days. Fixed in phenx/php-svg-lib 0.5.2.

On this page
php-svg-lib is a scalable vector graphics (SVG) file parsing/rendering library. Prior to version 0.5.2, php-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP < 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib. The `Style::fromAttributes(`), or the `Style::parseCssStyle()` should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the `Style::fromStyleSheets` might be reused. Libraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even remote code execution, if they do not double check the value of the `fontName` that is passed by php-svg-lib. Version 0.5.2 contains a fix for this issue.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.9% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 62nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-02-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-610 Externally Controlled Reference to a Resource in Another Sphere
CWE-73 External Control of File Name or Path
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A05:2025 Injection, A06:2025 Insecure Design, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-25117 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-25117?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-25117?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-25117 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
dompdf:php-svg-libbefore 0.5.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-f3qr-qr4x-j273Packagistphenx/php-svg-lib<0.5.20.5.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12php-dompdf-svg-lib0.5.0-3+deb12u1DEBIAN-CVE-2024-25117 DSA-5642-1

From the distributions' data via OSV.dev: the Debian Security Tracker. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian.

Attack patterns (CAPEC)

  • CAPEC-219 XML Routing Detour Attacks Likelihood: High · Severity: Medium
  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High
  • CAPEC-13 Subverting Environment Variable Values Likelihood: High · Severity: Very High
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-72 URL Encoding Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-80 Using UTF-8 Encoding to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-267 Leverage Alternate Encoding Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON