# CVE-2025-55166: svg-sanitizer By-Passing Attribute Sanitization

- Severity: Medium 5.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 49% of CVEs (2026-12-01)
- Published: 2025-08-12T16:25:17.220Z
- Modified: 2026-06-17T09:41:23.383Z
- Also known as: GHSA-22wq-q86m-83fh
- Weaknesses: CWE-79, CWE-601
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- darylldoyle svg-sanitizer: < 0.22.0
- enshrined/svg-sanitize (Packagist): before 0.22.0

## Every score

- GitHub_M: CVSS:4.0 5.1 Medium `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`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-22wq-q86m-83fh> (web)
- <https://github.com/darylldoyle/svg-sanitizer/commit/5a0a1eaf0c6b0b540dc945fe30c93cf106b357c1> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-55166> (advisory)
- <https://github.com/darylldoyle/svg-sanitizer/commit/0afa95ea74be155a7bcd6c6fb60c276c39984500> (web)
- <https://github.com/darylldoyle/svg-sanitizer> (package)
- <https://github.com/darylldoyle/svg-sanitizer/blob/0.21.0/src/Sanitizer.php#L454-L481> (web)
- <https://github.com/darylldoyle/svg-sanitizer/releases/tag/0.22.0> (web)

## Sources

- CVE List: [CVE-2025-55166](https://www.cve.org/CVERecord?id=CVE-2025-55166), CVE Terms of Use, modified 2025-08-12
- GitHub Advisory Database: [GHSA-22wq-q86m-83fh](https://github.com/advisories/GHSA-22wq-q86m-83fh), CC-BY-4.0, modified 2025-08-12
- NVD: [CVE-2025-55166](https://nvd.nist.gov/vuln/detail/CVE-2025-55166), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-55166 · Whole record: https://cve.day/CVE-2025-55166.json · Rebuilt by cve.day 2026-11-25T22:59:02.340Z
