php-svg-lib lacks path validation on font through SVG inline styles
CVE-2024-25117GHSA-f3qr-qr4x-j273
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (phenx/php-svg-lib 0.5.2), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Packagist phenx/php-svg-lib
- Affected
- < 0.5.2
- Fixed in
- 0.5.2
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-f3qr-qr4x-j273 lists affected ranges: Packagist phenx/php-svg-lib >=0 <0.5.2
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 6.8 · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
- EPSS
- CVE-2024-25117: 0.93% estimated exploitation activity in the next 30 days; percentile 60.73 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary 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. Details 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 : PoC Parsing the following SVG : will pass the phar:///path/to/whatever.phar/blaklis as $family in SurfaceCpdf::setFont, which is then passed to the canvas selectFont as a $fontName. Impact Libraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even RCE, if they do not double check the value of the fontName that is…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-f3qr-qr4x-j273
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2024-25117 Advisory: php-svg-lib lacks path validation on font through SVG inline styles IDs: CVE-2024-25117, GHSA-f3qr-qr4x-j273 Record: https://patchnext.com/advisories/cve-2024-25117 (revision 1, source checked 26 Oct 2026, 14:38 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 6.8) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: phenx/php-svg-lib 0.5.2. A vendor fix does not mean a deployment is fixed. ## Affected components - Packagist phenx/php-svg-lib: affected < 0.5.2; fixed in 0.5.2 ## Suggested inspection (read-only) - Packagist phenx/php-svg-lib: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on phenx/php-svg-lib. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-f3qr-qr4x-j273 (GitHub-reviewed advisory GHSA-f3qr-qr4x-j273 lists affected ranges: Packagist phenx/php-svg-lib >=0 <0.5.2) Commands are suggestions: review each one before running it.
Loading voting…