diff --git a/advisories/github-reviewed/2024/02/GHSA-97m3-52wr-xvv2/GHSA-97m3-52wr-xvv2.json b/advisories/github-reviewed/2024/02/GHSA-97m3-52wr-xvv2/GHSA-97m3-52wr-xvv2.json
index 36bc30e0f30..52113031fd2 100644
--- a/advisories/github-reviewed/2024/02/GHSA-97m3-52wr-xvv2/GHSA-97m3-52wr-xvv2.json
+++ b/advisories/github-reviewed/2024/02/GHSA-97m3-52wr-xvv2/GHSA-97m3-52wr-xvv2.json
@@ -1,13 +1,13 @@
{
"schema_version": "1.4.0",
"id": "GHSA-97m3-52wr-xvv2",
- "modified": "2024-02-23T16:49:58Z",
+ "modified": "2024-02-23T18:42:51Z",
"published": "2024-02-22T18:15:41Z",
"aliases": [
],
"summary": "Dompdf's usage of vulnerable version of phenx/php-svg-lib leads to restriction bypass and potential RCE",
- "details": "### Summary\nA lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP < 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\n### Details\nThe problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\n```\n$name = basename($font);\n$dir = dirname($font);\n[...]\n$metrics_name = \"$name.ufm\";\n[...]\n\nif (!isset($this->fonts[$font]) && file_exists(\"$dir/$metrics_name\")) {\n```\n\nPassing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\n### PoC\n\nConsider the following, minimal PHP code : \n\n```\nloadHtml($_GET['payload']);\n$dompdf->setPaper('A4', 'landscape');\n$options = $dompdf->getOptions();\n$options->setAllowedProtocols([]);\n$dompdf->render();\n$dompdf->stream();\n```\n\nWith payload being this html file : \n\n```\n\n\n\n```\n\nwith the base64 image being : \n```\n\n\n```\n\nA connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.",
+ "details": "### Summary\nA lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP < 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\n### Details\nThe problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\n```\n$name = basename($font);\n$dir = dirname($font);\n[...]\n$metrics_name = \"$name.ufm\";\n[...]\n\nif (!isset($this->fonts[$font]) && file_exists(\"$dir/$metrics_name\")) {\n```\n\nPassing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\n### PoC\n\nConsider the following, minimal PHP code : \n\n```\nloadHtml($_GET['payload']);\n$dompdf->setPaper('A4', 'landscape');\n$options = $dompdf->getOptions();\n$options->setAllowedProtocols([]);\n$dompdf->render();\n$dompdf->stream();\n```\n\nWith payload being this html file : \n\n```\n\n\n\n```\n\nwith the base64 image being : \n```\n\n\n```\n\nA connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.",
"severity": [
{
"type": "CVSS_V3",