CVE-2024-25117

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.
Configurations

No configuration.

History

22 Feb 2024, 19:07

Type Values Removed Values Added
Summary
  • (es) php-svg-lib es una librería escalable de análisis/renderización de archivos de gráficos vectoriales (SVG). Antes de la versión 0.5.2, php-svg-lib no valida que font-family no contenga una URL PHAR, lo que podría llevar a RCE en PHP &lt; 8.0, y no valida si se permiten referencias externas. Esto podría llevar a eludir las restricciones o RCE en los proyectos que lo utilizan, si no revalidan estrictamente el nombre de fuente pasado por php-svg-lib. El `Style::fromAttributes(`), o el `Style::parseCssStyle()` deben verificar el contenido de la `font-family` y evitar que use una URL PHAR, para evitar pasar un `fontName` inválido y peligroso. valor para otras librerías. Se puede reutilizar la misma comprobación realizada en `Style::fromStyleSheets`. Las librerías que utilizan esta librería como dependencia pueden ser vulnerables a alguna elusión de restricciones, o incluso a la ejecución remota de código, si no verifican dos veces el valor de `fontName` que pasa por php-svg-lib. La versión 0.5.2 contiene una solución para este problema.

21 Feb 2024, 17:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-02-21 17:15

Updated : 2024-02-22 19:07


NVD link : CVE-2024-25117

Mitre link : CVE-2024-25117

CVE.ORG link : CVE-2024-25117


JSON object : View

Products Affected

No product.

CWE
CWE-502

Deserialization of Untrusted Data

CWE-73

External Control of File Name or Path