From e8c531d733bdb8e5ddb53385386306e71f49323e Mon Sep 17 00:00:00 2001
From: "advisory-database[bot]"
<45398580+advisory-database[bot]@users.noreply.github.com>
Date: Thu, 6 Mar 2025 18:16:42 +0000
Subject: [PATCH] Publish Advisories
GHSA-6hwr-6v2f-3m88
GHSA-r8w8-74ww-j4wh
GHSA-jw4x-v69f-hh5w
GHSA-79xx-vf93-p7cx
---
.../GHSA-6hwr-6v2f-3m88.json | 23 ++++++++++++++--
.../GHSA-r8w8-74ww-j4wh.json | 23 ++++++++++++++--
.../GHSA-jw4x-v69f-hh5w.json | 23 ++++++++++++++--
.../GHSA-79xx-vf93-p7cx.json | 27 +++++++++++++++++--
4 files changed, 88 insertions(+), 8 deletions(-)
diff --git a/advisories/github-reviewed/2024/10/GHSA-6hwr-6v2f-3m88/GHSA-6hwr-6v2f-3m88.json b/advisories/github-reviewed/2024/10/GHSA-6hwr-6v2f-3m88/GHSA-6hwr-6v2f-3m88.json
index 4e8681bf01a..05e1010a9c3 100644
--- a/advisories/github-reviewed/2024/10/GHSA-6hwr-6v2f-3m88/GHSA-6hwr-6v2f-3m88.json
+++ b/advisories/github-reviewed/2024/10/GHSA-6hwr-6v2f-3m88/GHSA-6hwr-6v2f-3m88.json
@@ -1,13 +1,13 @@
{
"schema_version": "1.4.0",
"id": "GHSA-6hwr-6v2f-3m88",
- "modified": "2024-10-07T22:30:06Z",
+ "modified": "2025-03-06T18:14:41Z",
"published": "2024-10-07T15:58:52Z",
"aliases": [
"CVE-2024-45293"
],
"summary": "XXE in PHPSpreadsheet's XLSX reader",
- "details": "### Summary\nThe security scanner responsible for preventing XXE attacks in the XLSX reader can be bypassed by slightly modifying the XML structure, utilizing white-spaces. On servers that allow users to upload their own Excel (XLSX) sheets, Server files and sensitive information can be disclosed by providing a crafted sheet. \n\n### Details\nThe security scan function in `src/PhpSpreadsheet/Reader/Security/XmlScanner.php` contains a flawed XML encoding check to retrieve the input file's XML encoding in the `toUtf8` function. \n\nThe function searches for the XML encoding through a defined regex which looks for `encoding=\"*\"` and/or `encoding='*'`, if not found, it defaults to the UTF-8 encoding which bypasses the conversion logic. \n\n ```\n$patterns = [\n '/encoding=\"([^\"]*]?)\"/',\n \"/encoding='([^']*?)'/\",\n];\n```\n\nThis logic can be used to pass a UTF-7 encoded XXE payload, by utilizing a whitespace before or after the `=` in the attribute definition. \n\n### PoC\n\nNeeded:\n- An Excel sheet (XLSX) with at least one cell containing a value.\n\nUnzip the excel sheet, and modify the `xl/SharedStrings.xml` file with the following value (note the space after `encoding=`):\n\n```\n\n+ADw-!DOCTYPE abc [ ... ]>\n```\n\n#### Step-by-step\n\n1. First off, the following string is encoded in base64:\n\n```\n\" \n```\n\nResulting in:\n\n```\nPCFFTlRJVFkgaW50ZXJuYWwgJ2FiYycgID4K\n```\n\n2. The string is used with a parameter entity and the PHP filter wrapper to ultimately define custom entities and call them within the XML.\n\n```\n\n+ADw-!DOCTYPE foo [ %xxe;]>\n&internal;\n```\n\nWhen this file is parsed by the library, the value `abc` should be in the original filled cell.\n\nWith the help of the PHP filter wrapper, this can be escalated to information disclosure/file read. \n\n### Impact\nSensitive information disclosure through the XXE on sites that allow users to upload their own excel spreadsheets, and parse them using PHPSpreadsheet's Excel parser.\n",
+ "details": "### Summary\nThe security scanner responsible for preventing XXE attacks in the XLSX reader can be bypassed by slightly modifying the XML structure, utilizing white-spaces. On servers that allow users to upload their own Excel (XLSX) sheets, Server files and sensitive information can be disclosed by providing a crafted sheet. \n\n### Details\nThe security scan function in `src/PhpSpreadsheet/Reader/Security/XmlScanner.php` contains a flawed XML encoding check to retrieve the input file's XML encoding in the `toUtf8` function. \n\nThe function searches for the XML encoding through a defined regex which looks for `encoding=\"*\"` and/or `encoding='*'`, if not found, it defaults to the UTF-8 encoding which bypasses the conversion logic. \n\n ```\n$patterns = [\n '/encoding=\"([^\"]*]?)\"/',\n \"/encoding='([^']*?)'/\",\n];\n```\n\nThis logic can be used to pass a UTF-7 encoded XXE payload, by utilizing a whitespace before or after the `=` in the attribute definition. \n\n### PoC\n\nNeeded:\n- An Excel sheet (XLSX) with at least one cell containing a value.\n\nUnzip the excel sheet, and modify the `xl/SharedStrings.xml` file with the following value (note the space after `encoding=`):\n\n```\n\n+ADw-!DOCTYPE abc [ ... ]>\n```\n\n#### Step-by-step\n\n1. First off, the following string is encoded in base64:\n\n```\n\" \n```\n\nResulting in:\n\n```\nPCFFTlRJVFkgaW50ZXJuYWwgJ2FiYycgID4K\n```\n\n2. The string is used with a parameter entity and the PHP filter wrapper to ultimately define custom entities and call them within the XML.\n\n```\n\n+ADw-!DOCTYPE foo [ %xxe;]>\n&internal;\n```\n\nWhen this file is parsed by the library, the value `abc` should be in the original filled cell.\n\nWith the help of the PHP filter wrapper, this can be escalated to information disclosure/file read. \n\n### Impact\nSensitive information disclosure through the XXE on sites that allow users to upload their own excel spreadsheets, and parse them using PHPSpreadsheet's Excel parser.",
"severity": [
{
"type": "CVSS_V3",
@@ -75,6 +75,25 @@
]
}
]
+ },
+ {
+ "package": {
+ "ecosystem": "Packagist",
+ "name": "phpoffice/phpexcel"
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [
+ {
+ "introduced": "0"
+ },
+ {
+ "last_affected": "1.8.2"
+ }
+ ]
+ }
+ ]
}
],
"references": [
diff --git a/advisories/github-reviewed/2024/10/GHSA-r8w8-74ww-j4wh/GHSA-r8w8-74ww-j4wh.json b/advisories/github-reviewed/2024/10/GHSA-r8w8-74ww-j4wh/GHSA-r8w8-74ww-j4wh.json
index 3c50be42345..fa50f3500f3 100644
--- a/advisories/github-reviewed/2024/10/GHSA-r8w8-74ww-j4wh/GHSA-r8w8-74ww-j4wh.json
+++ b/advisories/github-reviewed/2024/10/GHSA-r8w8-74ww-j4wh/GHSA-r8w8-74ww-j4wh.json
@@ -1,13 +1,13 @@
{
"schema_version": "1.4.0",
"id": "GHSA-r8w8-74ww-j4wh",
- "modified": "2024-10-07T22:29:54Z",
+ "modified": "2025-03-06T18:14:05Z",
"published": "2024-10-07T15:58:25Z",
"aliases": [
"CVE-2024-45292"
],
"summary": "PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks",
- "details": "### Summary\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\Html` does not sanitize \"javascript:\" URLs from hyperlink `href` attributes, resulting in a Cross-Site Scripting vulnerability.\n\n### PoC\n\nExample target script:\n\n```\nload(__DIR__ . '/book.xlsx');\n\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\nprint($writer->generateHTMLAll());\n```\n\nSave this file in the same directory:\n[book.xlsx](https://github.com/PHPOffice/PhpSpreadsheet/files/15099763/book.xlsx)\n\nOpen index.php in a web browser and click on both links. The first demonstrates the vulnerability in a regular hyperlink and the second in a HYPERLINK() formula.\n",
+ "details": "### Summary\n`\\PhpOffice\\PhpSpreadsheet\\Writer\\Html` does not sanitize \"javascript:\" URLs from hyperlink `href` attributes, resulting in a Cross-Site Scripting vulnerability.\n\n### PoC\n\nExample target script:\n\n```\nload(__DIR__ . '/book.xlsx');\n\n$writer = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Html($spreadsheet);\nprint($writer->generateHTMLAll());\n```\n\nSave this file in the same directory:\n[book.xlsx](https://github.com/PHPOffice/PhpSpreadsheet/files/15099763/book.xlsx)\n\nOpen index.php in a web browser and click on both links. The first demonstrates the vulnerability in a regular hyperlink and the second in a HYPERLINK() formula.",
"severity": [
{
"type": "CVSS_V3",
@@ -75,6 +75,25 @@
]
}
]
+ },
+ {
+ "package": {
+ "ecosystem": "Packagist",
+ "name": "phpoffice/phpexcel"
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [
+ {
+ "introduced": "0"
+ },
+ {
+ "last_affected": "1.8.2"
+ }
+ ]
+ }
+ ]
}
],
"references": [
diff --git a/advisories/github-reviewed/2024/11/GHSA-jw4x-v69f-hh5w/GHSA-jw4x-v69f-hh5w.json b/advisories/github-reviewed/2024/11/GHSA-jw4x-v69f-hh5w/GHSA-jw4x-v69f-hh5w.json
index 7cae0ce078a..1107aad25d8 100644
--- a/advisories/github-reviewed/2024/11/GHSA-jw4x-v69f-hh5w/GHSA-jw4x-v69f-hh5w.json
+++ b/advisories/github-reviewed/2024/11/GHSA-jw4x-v69f-hh5w/GHSA-jw4x-v69f-hh5w.json
@@ -1,13 +1,13 @@
{
"schema_version": "1.4.0",
"id": "GHSA-jw4x-v69f-hh5w",
- "modified": "2024-11-18T20:01:20Z",
+ "modified": "2025-03-06T18:15:31Z",
"published": "2024-11-18T20:01:20Z",
"aliases": [
"CVE-2024-47873"
],
"summary": "XmlScanner bypass leads to XXE",
- "details": "### Summary\nThe [XmlScanner class](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php) has a [scan](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L72) method which should prevent XXE attacks.\n\nHowever, the regexes used in the `scan` method and the [findCharSet](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L51) method can be bypassed by using UCS-4 and encoding guessing as described in .\n\n\n### Details\nThe `scan` method converts the input in the UTF-8 encoding if it is not already in the UTF-8 encoding with the [`toUtf8` method](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L76).\nThen, the `scan` method uses a [regex](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L79) which would also work with 16-bit encoding.\n\nHowever, the regexes from the [findCharSet](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L51) method, which is used for determining the current encoding can be bypassed by using an encoding which has more than 8 bits, since the regex does not expect null bytes, and the XML library will also autodetect the encoding as described in .\n\nA payload for the `workbook.xml` file can for example be created with [CyberChef](https://gchq.github.io/CyberChef/#recipe=Encode_text('UTF-32BE%20(12001)')&input=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTE2IiBzdGFuZGFsb25lPSJ5ZXMiPz4KPCFET0NUWVBFIG1lc3NhZ2UgWwogICAgPCFFTlRJVFkgJSBleHQgU1lTVEVNICJodHRwOi8vMTI3LjAuMC4xOjEyMzQ1L2V4dC5kdGQiPgogICAgJWV4dDsKXT4KPHdvcmtib29rIHhtbG5zPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvc3ByZWFkc2hlZXRtbC8yMDA2L21haW4iIHhtbG5zOnI9Imh0dHA6Ly9zY2hlbWFzLm9wZW54bWxmb3JtYXRzLm9yZy9vZmZpY2VEb2N1bWVudC8yMDA2L3JlbGF0aW9uc2hpcHMiPjxmaWxlVmVyc2lvbiBhcHBOYW1lPSJDYWxjIi8%2BPHdvcmtib29rUHIgYmFja3VwRmlsZT0iZmFsc2UiIHNob3dPYmplY3RzPSJhbGwiIGRhdGUxOTA0PSJmYWxzZSIvPjx3b3JrYm9va1Byb3RlY3Rpb24vPjxib29rVmlld3M%2BPHdvcmtib29rVmlldyBzaG93SG9yaXpvbnRhbFNjcm9sbD0idHJ1ZSIgc2hvd1ZlcnRpY2FsU2Nyb2xsPSJ0cnVlIiBzaG93U2hlZXRUYWJzPSJ0cnVlIiB4V2luZG93PSIwIiB5V2luZG93PSIwIiB3aW5kb3dXaWR0aD0iMTYzODQiIHdpbmRvd0hlaWdodD0iODE5MiIgdGFiUmF0aW89IjUwMCIgZmlyc3RTaGVldD0iMCIgYWN0aXZlVGFiPSIwIi8%2BPC9ib29rVmlld3M%2BPHNoZWV0cz48c2hlZXQgbmFtZT0iU2hlZXQxIiBzaGVldElkPSIxIiBzdGF0ZT0idmlzaWJsZSIgcjppZD0icklkMiIvPjwvc2hlZXRzPjxjYWxjUHIgaXRlcmF0ZUNvdW50PSIxMDAiIHJlZk1vZGU9IkExIiBpdGVyYXRlPSJmYWxzZSIgaXRlcmF0ZURlbHRhPSIwLjAwMSIvPjxleHRMc3Q%2BPGV4dCB4bWxuczpsb2V4dD0iaHR0cDovL3NjaGVtYXMubGlicmVvZmZpY2Uub3JnLyIgdXJpPSJ7NzYyNkM4NjItMkExMy0xMUU1LUIzNDUtRkVGRjgxOUNEQzlGfSI%2BPGxvZXh0OmV4dENhbGNQciBzdHJpbmdSZWZTeW50YXg9IkNhbGNBMSIvPjwvZXh0PjwvZXh0THN0Pjwvd29ya2Jvb2s%2B.).\nIf you open an Excel file containing the payload from the link above stored in the `workbook.xml` file with PhpSpreadsheet, you will receive an HTTP request on `127.0.0.1:12345`. You can test that an HTTP request is created by running the `nc -nlvp 12345` command before opening the file containing the payload with PhpSpreadsheet.\n\n### PoC\n\n- Create a new folder.\n- Run the `composer require phpoffice/phpspreadsheet` command in the new folder.\n- Create an `index.php` file in that folder with the following content:\n```PHP\nsetReadDataOnly(true);\n\n$worksheetData = $reader->listWorksheetInfo($inputFileName);\n\nforeach ($worksheetData as $worksheet) {\n\n$sheetName = $worksheet['worksheetName'];\n\necho \"$sheetName
\";\n/** Load $inputFileName to a Spreadsheet Object **/\n$reader->setLoadSheetsOnly($sheetName);\n$spreadsheet = $reader->load($inputFileName);\n\n$worksheet = $spreadsheet->getActiveSheet();\nprint_r($worksheet->toArray());\n\n}\n```\n- Run the following command: `php -S 127.0.0.1:8080`\n- Add the [payload.xlsx](https://github.com/user-attachments/files/17334157/payload.xlsx) file, which contains a payload similar to the payload from the details section, but with the URL `https://webhook.site/65744200-63d2-43a2-a6a0-cca8d6b0d50a` instead of the `http://127.0.0.1:12345/ext.dtd` URL, in the folder and open in a browser. You will see an HTTP request on .\n\n### Impact\nAn attacker can bypass the sanitizer and achieve an [XXE attack](https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing).\n",
+ "details": "### Summary\nThe [XmlScanner class](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php) has a [scan](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L72) method which should prevent XXE attacks.\n\nHowever, the regexes used in the `scan` method and the [findCharSet](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L51) method can be bypassed by using UCS-4 and encoding guessing as described in .\n\n\n### Details\nThe `scan` method converts the input in the UTF-8 encoding if it is not already in the UTF-8 encoding with the [`toUtf8` method](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L76).\nThen, the `scan` method uses a [regex](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L79) which would also work with 16-bit encoding.\n\nHowever, the regexes from the [findCharSet](https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php#L51) method, which is used for determining the current encoding can be bypassed by using an encoding which has more than 8 bits, since the regex does not expect null bytes, and the XML library will also autodetect the encoding as described in .\n\nA payload for the `workbook.xml` file can for example be created with [CyberChef](https://gchq.github.io/CyberChef/#recipe=Encode_text('UTF-32BE%20(12001)')&input=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTE2IiBzdGFuZGFsb25lPSJ5ZXMiPz4KPCFET0NUWVBFIG1lc3NhZ2UgWwogICAgPCFFTlRJVFkgJSBleHQgU1lTVEVNICJodHRwOi8vMTI3LjAuMC4xOjEyMzQ1L2V4dC5kdGQiPgogICAgJWV4dDsKXT4KPHdvcmtib29rIHhtbG5zPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvc3ByZWFkc2hlZXRtbC8yMDA2L21haW4iIHhtbG5zOnI9Imh0dHA6Ly9zY2hlbWFzLm9wZW54bWxmb3JtYXRzLm9yZy9vZmZpY2VEb2N1bWVudC8yMDA2L3JlbGF0aW9uc2hpcHMiPjxmaWxlVmVyc2lvbiBhcHBOYW1lPSJDYWxjIi8%2BPHdvcmtib29rUHIgYmFja3VwRmlsZT0iZmFsc2UiIHNob3dPYmplY3RzPSJhbGwiIGRhdGUxOTA0PSJmYWxzZSIvPjx3b3JrYm9va1Byb3RlY3Rpb24vPjxib29rVmlld3M%2BPHdvcmtib29rVmlldyBzaG93SG9yaXpvbnRhbFNjcm9sbD0idHJ1ZSIgc2hvd1ZlcnRpY2FsU2Nyb2xsPSJ0cnVlIiBzaG93U2hlZXRUYWJzPSJ0cnVlIiB4V2luZG93PSIwIiB5V2luZG93PSIwIiB3aW5kb3dXaWR0aD0iMTYzODQiIHdpbmRvd0hlaWdodD0iODE5MiIgdGFiUmF0aW89IjUwMCIgZmlyc3RTaGVldD0iMCIgYWN0aXZlVGFiPSIwIi8%2BPC9ib29rVmlld3M%2BPHNoZWV0cz48c2hlZXQgbmFtZT0iU2hlZXQxIiBzaGVldElkPSIxIiBzdGF0ZT0idmlzaWJsZSIgcjppZD0icklkMiIvPjwvc2hlZXRzPjxjYWxjUHIgaXRlcmF0ZUNvdW50PSIxMDAiIHJlZk1vZGU9IkExIiBpdGVyYXRlPSJmYWxzZSIgaXRlcmF0ZURlbHRhPSIwLjAwMSIvPjxleHRMc3Q%2BPGV4dCB4bWxuczpsb2V4dD0iaHR0cDovL3NjaGVtYXMubGlicmVvZmZpY2Uub3JnLyIgdXJpPSJ7NzYyNkM4NjItMkExMy0xMUU1LUIzNDUtRkVGRjgxOUNEQzlGfSI%2BPGxvZXh0OmV4dENhbGNQciBzdHJpbmdSZWZTeW50YXg9IkNhbGNBMSIvPjwvZXh0PjwvZXh0THN0Pjwvd29ya2Jvb2s%2B.).\nIf you open an Excel file containing the payload from the link above stored in the `workbook.xml` file with PhpSpreadsheet, you will receive an HTTP request on `127.0.0.1:12345`. You can test that an HTTP request is created by running the `nc -nlvp 12345` command before opening the file containing the payload with PhpSpreadsheet.\n\n### PoC\n\n- Create a new folder.\n- Run the `composer require phpoffice/phpspreadsheet` command in the new folder.\n- Create an `index.php` file in that folder with the following content:\n```PHP\nsetReadDataOnly(true);\n\n$worksheetData = $reader->listWorksheetInfo($inputFileName);\n\nforeach ($worksheetData as $worksheet) {\n\n$sheetName = $worksheet['worksheetName'];\n\necho \"$sheetName
\";\n/** Load $inputFileName to a Spreadsheet Object **/\n$reader->setLoadSheetsOnly($sheetName);\n$spreadsheet = $reader->load($inputFileName);\n\n$worksheet = $spreadsheet->getActiveSheet();\nprint_r($worksheet->toArray());\n\n}\n```\n- Run the following command: `php -S 127.0.0.1:8080`\n- Add the [payload.xlsx](https://github.com/user-attachments/files/17334157/payload.xlsx) file, which contains a payload similar to the payload from the details section, but with the URL `https://webhook.site/65744200-63d2-43a2-a6a0-cca8d6b0d50a` instead of the `http://127.0.0.1:12345/ext.dtd` URL, in the folder and open in a browser. You will see an HTTP request on .\n\n### Impact\nAn attacker can bypass the sanitizer and achieve an [XXE attack](https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing).",
"severity": [
{
"type": "CVSS_V3",
@@ -90,6 +90,25 @@
]
}
]
+ },
+ {
+ "package": {
+ "ecosystem": "Packagist",
+ "name": "phpoffice/phpexcel"
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [
+ {
+ "introduced": "0"
+ },
+ {
+ "last_affected": "1.8.2"
+ }
+ ]
+ }
+ ]
}
],
"references": [
diff --git a/advisories/github-reviewed/2025/01/GHSA-79xx-vf93-p7cx/GHSA-79xx-vf93-p7cx.json b/advisories/github-reviewed/2025/01/GHSA-79xx-vf93-p7cx/GHSA-79xx-vf93-p7cx.json
index 543a0632983..49cbe571098 100644
--- a/advisories/github-reviewed/2025/01/GHSA-79xx-vf93-p7cx/GHSA-79xx-vf93-p7cx.json
+++ b/advisories/github-reviewed/2025/01/GHSA-79xx-vf93-p7cx/GHSA-79xx-vf93-p7cx.json
@@ -1,14 +1,18 @@
{
"schema_version": "1.4.0",
"id": "GHSA-79xx-vf93-p7cx",
- "modified": "2025-01-21T21:09:14Z",
+ "modified": "2025-03-06T18:16:08Z",
"published": "2025-01-21T21:09:13Z",
"aliases": [
"CVE-2025-22131"
],
"summary": "Cross-Site Scripting (XSS) vulnerability in generateNavigation() function in PhpSpreadsheet",
- "details": "### Summary\nThe researcher discovered zero-day vulnerability Cross-Site Scripting (XSS) vulnerability in the code which translates the XLSX file into a HTML representation and displays it in the response.\n\n### Details\nWhen generating the HTML from an xlsx file containing multiple sheets, a navigation menu is created. This menu includes the sheet names, which are not sanitized. As a result, an attacker can exploit this vulnerability to execute JavaScript code.\n\n```php\n // Construct HTML\n $html = '';\n\n // Only if there are more than 1 sheets\n if (count($sheets) > 1) {\n // Loop all sheets\n $sheetId = 0;\n\n $html .= '' . PHP_EOL;\n\n foreach ($sheets as $sheet) {\n $html .= ' - ' . $sheet->getTitle() . '
' . PHP_EOL;\n ++$sheetId;\n }\n\n $html .= '
' . PHP_EOL;\n }\n```\n\n### PoC\n1. Create an XLSX file with multiple sheets : \n\n\n2. Generate the HTML content \n```php\nwriteAllSheets();\n\techo $writer->generateHTMLAll();\n?>\n```\n3. Enjoy\n\n\n\n### Impact\n\nXSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise.\nExample of impacts :\n\n- Disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account (Only if HttpOnly cookie's flag is set to false).\n- Redirecting the user to some other page or site (like phishing websites)\n- Modifying the content of the current page (add a fake login page that sends credentials to the attacker).\n- Automatically download malicious files.\n- Requests access to the victim geolocation / camera.\n- ...\n",
+ "details": "### Summary\nThe researcher discovered zero-day vulnerability Cross-Site Scripting (XSS) vulnerability in the code which translates the XLSX file into a HTML representation and displays it in the response.\n\n### Details\nWhen generating the HTML from an xlsx file containing multiple sheets, a navigation menu is created. This menu includes the sheet names, which are not sanitized. As a result, an attacker can exploit this vulnerability to execute JavaScript code.\n\n```php\n // Construct HTML\n $html = '';\n\n // Only if there are more than 1 sheets\n if (count($sheets) > 1) {\n // Loop all sheets\n $sheetId = 0;\n\n $html .= '' . PHP_EOL;\n\n foreach ($sheets as $sheet) {\n $html .= ' - ' . $sheet->getTitle() . '
' . PHP_EOL;\n ++$sheetId;\n }\n\n $html .= '
' . PHP_EOL;\n }\n```\n\n### PoC\n1. Create an XLSX file with multiple sheets : \n\n\n2. Generate the HTML content \n```php\nwriteAllSheets();\n\techo $writer->generateHTMLAll();\n?>\n```\n3. Enjoy\n\n\n\n### Impact\n\nXSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise.\nExample of impacts :\n\n- Disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account (Only if HttpOnly cookie's flag is set to false).\n- Redirecting the user to some other page or site (like phishing websites)\n- Modifying the content of the current page (add a fake login page that sends credentials to the attacker).\n- Automatically download malicious files.\n- Requests access to the victim geolocation / camera.\n- ...",
"severity": [
+ {
+ "type": "CVSS_V3",
+ "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
+ },
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
@@ -90,6 +94,25 @@
]
}
]
+ },
+ {
+ "package": {
+ "ecosystem": "Packagist",
+ "name": "phpoffice/phpexcel"
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [
+ {
+ "introduced": "0"
+ },
+ {
+ "last_affected": "1.8.2"
+ }
+ ]
+ }
+ ]
}
],
"references": [