{"id":"CVE-2025-55166","aliases":["CVE-2025-55166","GHSA-22wq-q86m-83fh"],"related":[],"kind":"vulnerability","state":"published","title":"svg-sanitizer By-Passing Attribute Sanitization","summary":"savg-sanitizer is a PHP SVG/XML sanitizer. Prior to version 0.22.0, the sanitization logic in the cleanXlinkHrefs method only searches for lower-case attribute name, which allows to by-pass the isHrefSafeValue check. As a result this allows cross-site scripting or linking to external domains. This issue has been patched in version 0.22.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"savg-sanitizer is a PHP SVG/XML sanitizer. Prior to version 0.22.0, the sanitization logic in the cleanXlinkHrefs method only searches for lower-case attribute name, which allows to by-pass the isHrefSafeValue check. As a result this allows cross-site scripting or linking to external domains. This issue has been patched in version 0.22.0.","source":"cvelist"},{"lang":"en","text":"#### Problem\n\nThe sanitization logic at https://github.com/darylldoyle/svg-sanitizer/blob/0.21.0/src/Sanitizer.php#L454-L481 only searches for lower-case attribute names (e.g. `xlink:href` instead of `xlink:HrEf`), which allows to by-pass the `isHrefSafeValue` check. As a result this allows cross-site scripting or linking to external domains.\n\n#### Proof-of-concept\n_provided by azizk_\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"100\" height=\"100\">\n  <a xlink:hReF=\"javascript:alert(document.domain)\">\n    <rect width=\"100\" height=\"50\" fill=\"red\"></rect>\n    <text x=\"50\" y=\"30\" text-anchor=\"middle\" fill=\"white\">Click me</text>\n  </a>\n</svg>\n```\n\n#### Credits\n\nThe mentioned findings and proof-of-concept example were reported to the TYPO3 Security Team by the external security researcher `azizk <medazizknani@gmail.com>`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"savg-sanitizer es un depurador PHP SVG/XML. Antes de la versión 0.22.0, la lógica de depuración del método cleanXlinkHrefs solo buscaba nombres de atributo en minúsculas, lo que permitía omitir la comprobación de isHrefSafeValue. Esto permitía el uso de cross-site scripting o la vinculación a dominios externos. Este problema se ha corregido en la versión 0.22.0.","source":"nvd"}],"published":"2025-08-12T16:25:17.220Z","modified":"2026-06-17T09:41:23.383Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-79","CWE-601"],"affected":[{"ranges":[{"version":"< 0.22.0","status":"affected"}],"vendor":"darylldoyle","product":"svg-sanitizer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.22.0"}],"ecosystem":"Packagist","package":"enshrined/svg-sanitize","purl":"pkg:composer/enshrined/svg-sanitize","source":"ghsa"}],"references":[{"url":"https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-22wq-q86m-83fh","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/darylldoyle/svg-sanitizer/commit/5a0a1eaf0c6b0b540dc945fe30c93cf106b357c1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-55166","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/darylldoyle/svg-sanitizer/commit/0afa95ea74be155a7bcd6c6fb60c276c39984500","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/darylldoyle/svg-sanitizer","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/darylldoyle/svg-sanitizer/blob/0.21.0/src/Sanitizer.php#L454-L481","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/darylldoyle/svg-sanitizer/releases/tag/0.22.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-08-12T17:47:50.627Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-55166","url":"https://www.cve.org/CVERecord?id=CVE-2025-55166","licence":"CVE Terms of Use","modified":"2025-08-12T17:48:05.000Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-22wq-q86m-83fh","url":"https://github.com/advisories/GHSA-22wq-q86m-83fh","licence":"CC-BY-4.0","modified":"2025-08-12T20:42:20.247Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-55166","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-55166","licence":"Public domain","modified":"2026-06-17T09:41:23.383Z"}],"updatedAt":"2026-11-25T22:59:02.340Z","epss":{"score":0.00585,"percentile":0.49319,"date":"2026-12-01T12:00:22.000Z"}}