enshrined/svg-sanitize: Stored XSS via DTD Entity / HTML5 Named Character Reference Collision
savg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, svg-sanitizer's isHrefSafeValue() validates an SVG href after XML DTD entity expansion, but saveXML() serializes the original entity reference after removing the DTD declaration. A crafted entity such as Tab can appear to the sanitizer as a safe fragment prefix while HTML5 Named Character Reference resolution during inline HTML rendering later converts the surviving reference to whitespace, exposing a javascript: URL. When an application embeds the sanitized SVG inline, a user who activates the link can cause script to execute in the embedding page's origin. This issue is fixed in version 1.0.0.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-107380
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 01:13 UTC · Revision 1
Source evidence
enshrined/svg-sanitize: Stored XSS via DTD Entity / HTML5 Named Character Reference Collision
core-osv · Original sourcePublished 8 Oct 2026, 18:06 UTC
savg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, svg-sanitizer's isHrefSafeValue() validates an SVG href after XML DTD entity expansion, but saveXML() serializes the original entity reference after removing the DTD declaration. A crafted entity such as Tab can appear to the sanitizer as a safe fragment prefix while HTML5 Named Character Reference resolution during inline HTML rendering later converts the surviving reference to whitespace, exposing a javascript: URL. When an application embeds the sanitized SVG inline, a user who activates the link can cause script to execute in the embedding page's origin. This issue is fixed in version 1.0.0.
osv:CVE-2026-107380
Complete source record
{
"id": "4a555c3a0f0b14d4b3f5c980f43721ab37f88a80c3bf37e4e8cce0572892ed2f",
"url": "https://osv.dev/vulnerability/CVE-2026-107380",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "enshrined/svg-sanitize: Stored XSS via DTD Entity / HTML5 Named Character Reference Collision",
"summary": "savg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, svg-sanitizer's isHrefSafeValue() validates an SVG href after XML DTD entity expansion, but saveXML() serializes the original entity reference after removing the DTD declaration. A crafted entity such as Tab can appear to the sanitizer as a safe fragment prefix while HTML5 Named Character Reference resolution during inline HTML rendering later converts the surviving reference to whitespace, exposing a javascript: URL. When an application embeds the sanitized SVG inline, a user who activates the link can cause script to execute in the embedding page's origin. This issue is fixed in version 1.0.0.",
"evidence": "osv:CVE-2026-107380",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-107380",
"aliases": [
"CVE-2026-107380",
"GHSA-9rjx-3jch-6vjf"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/darylldoyle/svg-sanitizer",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "f3300fcd1bbf67d205b52217c75d0f7d6a8c47ff"
},
{
"fixed": "23877db7e76f1e1df5c3e65ab30239219c3d2867"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.0.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "23877db7e76f1e1df5c3e65ab30239219c3d2867"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "f3300fcd1bbf67d205b52217c75d0f7d6a8c47ff"
}
],
"source": "REFERENCES_TAG",
"original_tag": "1.0.0"
}
]
}
}
],
"versions": [
"0.22.0",
"0.21.0",
"0.20.0",
"0.19.0",
"0.18.0",
"0.17.0",
"0.16.0",
"0.15.4",
"0.15.3",
"0.15.2",
"0.15.1",
"0.15.0",
"0.14.1",
"0.14.0",
"0.13.3",
"0.13.2",
"0.10.0",
"0.9.2",
"0.9.1",
"0.9.0",
"0.8.2",
"0.8.1",
"0.8.0",
"0.7.2",
"0.7.1",
"0.7.0",
"0.6.0",
"0.5.3.1",
"0.5.3",
"0.5.2",
"0.5.1",
"0.5.0",
"0.4.1",
"0.4.0",
"0.3.0",
"0.2.1",
"0.2.0",
"0.1.6",
"0.1.5",
"0.1.4",
"0.1.3",
"0.1.2",
"0.1.1",
"0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-107380.json"
}
}
],
"modified": "2026-10-28T02:30:52.447383132Z",
"provider": "osv",
"references": [
"https://github.com/darylldoyle/svg-sanitizer/releases/tag/1.0.0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107380.json",
"https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-9rjx-3jch-6vjf",
"https://nvd.nist.gov/vuln/detail/CVE-2026-107380",
"https://github.com/darylldoyle/svg-sanitizer/commit/23877db7e76f1e1df5c3e65ab30239219c3d2867"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107380.json"
}
},
"related_cves": [
{
"value": "CVE-2026-107380",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 521244,
"published_at": "2026-10-08T18:06:14.107+00:00"
}