{"id":"CVE-2021-3838","aliases":["CLSA-2025-1766019429","CLSA-2025-1766364765","DEBIAN-CVE-2021-3838","DLA-3495-1","DLA-3495-2","DLA-4427-1","EUVD-2024-3197","GHSA-577p-7j7h-2jgf","UBUNTU-CVE-2021-3838","USN-6277-1","USN-6277-2"],"status":"published","title":"PHAR Deserialization in dompdf/dompdf","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01432,"percentile":0.73277,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-502"],"published":"2023-02-14T00:00:00Z","modified":"2026-10-23T18:03:31Z","fixes":[{"ecosystem":"Packagist","package":"dompdf/dompdf","fixed_in":["2.0.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"php-dompdf","fixed_in":["2.0.2+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:10","package":"php-dompdf","fixed_in":["0.6.2+dfsg-3+deb10u2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"php-dompdf","fixed_in":["0.6.1+dfsg-2ubuntu1+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"php-dompdf","fixed_in":["0.6.2+dfsg-3ubuntu0.18.04.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"php-dompdf","fixed_in":["0.6.2+dfsg-3ubuntu0.20.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"php-dompdf","fixed_in":["0.6.2+dfsg-3.1ubuntu0.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"v1.2.2"},{"fixed":"1.2.2-p1+tuxcare"}]}],"versions":["v1.2.2"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.6"},{"fixed":"0.8.6-p1+tuxcare"}]}],"versions":["0.8.6"],"bundled":8},{"source":"osv","ecosystem":"Debian:12","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.2+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3+deb10u1"}]}],"versions":["0.6.2+dfsg-3"],"bundled":2},{"source":"osv","ecosystem":"Debian:10","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3+deb10u2"}]}],"versions":["0.6.2+dfsg-3","0.6.2+dfsg-3+deb10u1"]},{"source":"osv","ecosystem":"Debian:11","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3.1+deb11u1"}]}],"versions":["0.6.2+dfsg-3.1"],"bundled":2},{"source":"osv","ecosystem":"Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"versions":["v0.6.0","v0.6.1","v0.6.2","v0.7.0","v0.7.0-beta","v0.7.0-beta2","v0.7.0-beta3","v0.8.0","v0.8.1","v0.8.2","v0.8.3","v0.8.4","v0.8.5","v0.8.6","v1.0.0","v1.0.1","v1.0.2","v1.1.0","v1.1.1","v1.2.0","v1.2.1","v1.2.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1+dfsg-2ubuntu1+esm1"}]}],"versions":["0.6.1+dfsg-2","0.6.1+dfsg-2build1","0.6.1+dfsg-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3ubuntu0.18.04.1~esm1"}]}],"versions":["0.6.2+dfsg-3"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3ubuntu0.20.04.1"}]}],"versions":["0.6.2+dfsg-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3.1ubuntu0.1"}]}],"versions":["0.6.2+dfsg-3.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1+dfsg-2ubuntu1+esm1"}]}],"versions":["0.6.1+dfsg-2","0.6.1+dfsg-2build1","0.6.1+dfsg-2ubuntu1"],"bundled":5},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3ubuntu0.18.04.1~esm1"}]}],"versions":["0.6.2+dfsg-3"],"bundled":5},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3ubuntu0.20.04.1"}]}],"versions":["0.6.2+dfsg-3"],"bundled":5},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-3.1ubuntu0.1"}]}],"versions":["0.6.2+dfsg-3.1"],"bundled":2}],"products":[{"vendor":"dompdf","product":"dompdf"},{"vendor":"dompdf","product":"dompdf/dompdf"},{"vendor":"dompdf_project","product":"dompdf"}],"references":[{"url":"https://huntr.com/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e","tags":["Exploit","Issue Tracking","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/dompdf/dompdf/commit/99aeec1efec9213e87098d42eb09439e7ee0bb6a","tags":["Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3838","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-577p-7j7h-2jgf"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-3838","tags":["advisory"]},{"url":"https://github.com/dompdf/dompdf","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-3838","tags":["report"]},{"url":"https://github.com/dompdf/dompdf/issues/2564","tags":["report"]},{"url":"https://huntr.dev/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6277-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-6277-2","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-3838","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2014-5011","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2014-5012","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2014-5013","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-2400","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-3838","title":"PHAR Deserialization in dompdf/dompdf","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T10:51:36.766Z","modified":"2024-11-18T14:41:07.247Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:33:03.671751Z"}],"euvd":[{"id":"EUVD-2024-3197","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T10:51:36Z","modified":"2024-11-18T14:41:07Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T00:04:57.054288Z"}],"ghsa":[{"id":"GHSA-577p-7j7h-2jgf","title":"Deserialization of Untrusted Data in dompdf/dompdf","description":"DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T12:31:44Z","modified":"2024-11-18T21:23:08Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:38:20.833758Z"}],"nvd":[{"id":"CVE-2021-3838","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T11:15:05.763Z","modified":"2026-06-17T04:05:52.13Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:07:08.629518Z"}],"osv":[{"id":"CVE-2021-3838","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T11:15:05.763Z","modified":"2026-10-20T10:54:51.826375714Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:20.843843Z"},{"id":"DEBIAN-CVE-2021-3838","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T11:15:05.763Z","modified":"2026-10-23T18:03:31.489186727Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"GHSA-577p-7j7h-2jgf","title":"Deserialization of Untrusted Data in dompdf/dompdf","description":"DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2024-11-15T12:31:44Z","modified":"2024-11-18T21:26:30.023918Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:46:37.864461Z"},{"id":"UBUNTU-CVE-2021-3838","description":"DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.","status":"published","published":"2023-02-14T00:00:00Z","modified":"2026-02-04T03:15:29.56002Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:28.526929Z"},{"id":"CLSA-2025-1766019429","title":"TuxCare security update for dompdf/dompdf (7 CVEs)","description":"TuxCare rebuilt dompdf/dompdf to address 7 CVEs. Fixed in 1.2.2-p1+tuxcare.","status":"published","published":"2026-08-04T14:52:39Z","modified":"2026-10-15T09:47:40.737007889Z","updated_at":"2026-11-02T15:43:42.847264Z"},{"id":"CLSA-2025-1766364765","title":"TuxCare security update for dompdf/dompdf (8 CVEs)","description":"TuxCare rebuilt dompdf/dompdf to address 8 CVEs. Fixed in 0.8.6-p1+tuxcare.","status":"published","published":"2026-08-04T14:52:36Z","modified":"2026-10-15T09:48:00.297535956Z","updated_at":"2026-11-02T15:43:42.847264Z"},{"id":"DLA-3495-1","title":"php-dompdf - security update","status":"published","published":"2023-07-13T00:00:00Z","modified":"2026-03-09T01:19:12.888518Z","updated_at":"2026-11-02T15:46:11.734021Z"},{"id":"DLA-3495-2","title":"php-dompdf - regression update","status":"published","published":"2023-08-10T00:00:00Z","modified":"2026-03-09T01:22:39.188137Z","updated_at":"2026-11-02T15:46:11.734021Z"},{"id":"DLA-4427-1","title":"php-dompdf - security update","status":"published","published":"2025-12-30T00:00:00Z","modified":"2025-12-30T09:29:51.342555Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"USN-6277-1","title":"php-dompdf vulnerabilities","description":"It was discovered that Dompdf was not properly validating untrusted input when\nprocessing HTML content under certain circumstances. An attacker could\npossibly use this issue to expose sensitive information or execute arbitrary\ncode. This issue only affected Ubuntu 16.04 LTS.\n(CVE-2014-5011, CVE-2014-5012, CVE-2014-5013)\n\nIt was discovered that Dompdf was not properly validating processed HTML\ncontent that referenced PHAR files, which could result in the deserialization\nof untrusted data. An attacker could possibly use this issue to execute\narbitrary code. (CVE-2021-3838)\n\nIt was discovered that Dompdf was not properly validating processed HTML\ncontent that referenced both a remote base and a local file, which could\nresult in the bypass of a chroot check. An attacker could possibly use this\nissue to expose sensitive information. (CVE-2022-2400)\n","status":"published","published":"2023-08-08T14:10:26Z","modified":"2026-06-25T13:32:14.974905335Z","updated_at":"2026-11-02T16:58:17.305935Z"},{"id":"USN-6277-2","title":"php-dompdf vulnerabilities","description":"USN-6277-1 fixed vulnerabilities in Dompdf. This update provides the\ncorresponding updates for Ubuntu 22.04 LTS.\n\nOriginal advisory details:\n\n It was discovered that Dompdf was not properly validating untrusted input when\n processing HTML content under certain circumstances. An attacker could\n possibly use this issue to expose sensitive information or execute arbitrary\n code. This issue only affected Ubuntu 16.04 LTS.\n (CVE-2014-5011, CVE-2014-5012, CVE-2014-5013)\n \n It was discovered that Dompdf was not properly validating processed HTML\n content that referenced PHAR files, which could result in the deserialization\n of untrusted data. An attacker could possibly use this issue to execute\n arbitrary code. (CVE-2021-3838)\n \n It was discovered that Dompdf was not properly validating processed HTML\n content that referenced both a remote base and a local file, which could\n result in the bypass of a chroot check. An attacker could possibly use this\n issue to expose sensitive information. (CVE-2022-2400)\n","status":"published","published":"2023-08-10T18:31:51Z","modified":"2026-04-27T17:02:13.43777991Z","updated_at":"2026-11-02T16:58:17.305935Z"}]}}
