URI validation failure on SVG parsing. Bypass of CVE-2023-23924
Dompdf is an HTML to PDF converter written in php. Due to the difference in the attribute parser of Dompdf and php-svg-lib, an attacker can still call arbitrary URLs with arbitrary protocols. Dompdf parses the href attribute of `image` tags and respects `xlink:href` even if `href` is specified. However, php-svg-lib, which is later used to parse the svg file, parses the href attribute. Since `href` is respected if both `xlink:href` and `href` is specified, it's possible to bypass the protection on the Dompdf side by providing an empty `xlink:href` attribute. An attacker can exploit the vulnerability to call arbitrary URLs with arbitrary protocols if they provide an SVG file to the Dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, which will lead, at the very least, to arbitrary file deletion and might lead to remote code execution, depending on available classes. This vulnerability has been addressed in commit `95009ea98` which has been included in release version 2.0.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-24813
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 05:48 UTC · Revision 1
Source evidence
URI validation failure on SVG parsing. Bypass of CVE-2023-23924
core-osv · Original sourcePublished 7 Feb 2023, 18:05 UTC
Dompdf is an HTML to PDF converter written in php. Due to the difference in the attribute parser of Dompdf and php-svg-lib, an attacker can still call arbitrary URLs with arbitrary protocols. Dompdf parses the href attribute of `image` tags and respects `xlink:href` even if `href` is specified. However, php-svg-lib, which is later used to parse the svg file, parses the href attribute. Since `href` is respected if both `xlink:href` and `href` is specified, it's possible to bypass the protection on the Dompdf side by providing an empty `xlink:href` attribute. An attacker can exploit the vulnerability to call arbitrary URLs with arbitrary protocols if they provide an SVG file to the Dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, which will lead, at the very least, to arbitrary file deletion and might lead to remote code execution, depending on available classes. This vulnerability has been addressed in commit `95009ea98` which has been included in release version 2.0.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.
osv:CVE-2023-24813
Complete source record
{
"id": "7fa72c03b8a0b43f9463b0c11a7f41919e97c9c7c46acadbd063e8e76ccd9fae",
"url": "https://osv.dev/vulnerability/CVE-2023-24813",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "URI validation failure on SVG parsing. Bypass of CVE-2023-23924",
"summary": "Dompdf is an HTML to PDF converter written in php. Due to the difference in the attribute parser of Dompdf and php-svg-lib, an attacker can still call arbitrary URLs with arbitrary protocols. Dompdf parses the href attribute of `image` tags and respects `xlink:href` even if `href` is specified. However, php-svg-lib, which is later used to parse the svg file, parses the href attribute. Since `href` is respected if both `xlink:href` and `href` is specified, it's possible to bypass the protection on the Dompdf side by providing an empty `xlink:href` attribute. An attacker can exploit the vulnerability to call arbitrary URLs with arbitrary protocols if they provide an SVG file to the Dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, which will lead, at the very least, to arbitrary file deletion and might lead to remote code execution, depending on available classes. This vulnerability has been addressed in commit `95009ea98` which has been included in release version 2.0.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.",
"evidence": "osv:CVE-2023-24813",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2023-24813",
"aliases": [
"CVE-2023-24813",
"GHSA-56gj-mvh6-rp75"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/dompdf/dompdf",
"type": "GIT",
"events": [
{
"introduced": "ad4c631bf8897fc1ca7b566468a969cfd71a558a"
},
{
"fixed": "95009ea98230f9b084b040c34e3869ef3dccc9aa"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "= 2.0.2"
},
{
"last_affected": "= 2.0.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandaloneSingleVersion"
},
{
"range": [
{
"fixed": "95009ea98230f9b084b040c34e3869ef3dccc9aa"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"2.0.2",
"= 2.0.2",
"v2.0.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-24813.json"
}
}
],
"modified": "2026-10-28T02:30:43.013405027Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/24xxx/CVE-2023-24813.json",
"https://github.com/dompdf/dompdf/security/advisories/GHSA-56gj-mvh6-rp75",
"https://nvd.nist.gov/vuln/detail/CVE-2023-24813",
"https://github.com/dompdf/dompdf/commit/95009ea98230f9b084b040c34e3869ef3dccc9aa"
],
"provider_metadata": {
"cwe_ids": [
"CWE-436"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/24xxx/CVE-2023-24813.json"
}
},
"related_cves": [
{
"value": "CVE-2023-24813",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510827,
"published_at": "2023-02-07T18:05:14.541+00:00"
}