{"answers":{"affected":"8 open source packages ship an affected version, including phpoffice/phpspreadsheet and phpoffice/phpexcel. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45293 exists.","fix":"Upgrade phpoffice/phpspreadsheet to a fixed version for your release line: 1.29.1, 2.1.1 or 2.3.0.","what":"CVE-2024-45293 is a high-severity vulnerability in PHPOffice PhpSpreadsheet, published on 7 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-45293 and fix it if it is affected.\n\nWhat it is: CVE-2024-45293 is a high-severity vulnerability in PHPOffice PhpSpreadsheet, published on 7 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45293 exists.\n\nAffected packages and fixed versions:\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.29.1\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.29.1\n- phpoffice/phpspreadsheet (Packagist): affected from 2.0.0; fixed in 2.1.1\n- phpoffice/phpspreadsheet (Packagist): affected from 2.0.0; fixed in 2.1.1\n- phpoffice/phpspreadsheet (Packagist): affected from 2.2.0; fixed in 2.3.0\n- phpoffice/phpspreadsheet (Packagist): affected from 2.2.0; fixed in 2.3.0\n- phpoffice/phpexcel (Packagist): affected all versions up to 1.8.2; no fix listed\n- phpoffice/phpexcel (Packagist): affected all versions up to 1.8.2; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-45293/ (Markdown: https://insights.sbomify.com/CVE-2024-45293/index.md)","id":"CVE-2024-45293","markdown":"https://insights.sbomify.com/CVE-2024-45293/index.md","name":"CVE-2024-45293","record":{"aliases":["GHSA-6hwr-6v2f-3m88"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP spreadsheet library","requires_auth":"none","summary":"Attackers can disclose sensitive server files by uploading crafted XLSX files to applications using PHPSpreadsheet, bypassing XML security checks.","user_interaction":"not_required","vuln_class":"xxe"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"phpspreadsheet","vendor":"phpoffice"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"}],"description":"PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. The 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. The 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. The 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. This logic can be used to pass a UTF-7 encoded XXE payload, by utilizing a whitespace before or after the = in the attribute definition. Sensitive information disclosure through the XXE on sites that allow users to upload their own excel spreadsheets, and parse them using PHPSpreadsheet's Excel parser. This issue has been addressed in release versions 1.29.1, 2.1.1, and 2.3.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2024/CVE-2024-45293.yaml","stars":null,"title":"TablePress \u003c 2.4.3 - XXE Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"XML External Entity Reference (XXE) in PHPSpreadsheet's XLSX reader","id":"CVE-2024-45293","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xxe","year":"2024"},"n_packages":8,"n_references":1,"next":{"headline":"`org.hl7.fhir.core` XXE vulnerability in XSLT transforms","id":"CVE-2024-45294"},"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":null,"source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["1.29.1"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["1.29.1"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["2.3.0"],"introduced":["2.2.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-6hwr-6v2f-3m88"},{"ecosystem":"Packagist","fixed":["2.3.0"],"introduced":["2.2.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-6hwr-6v2f-3m88"}],"prev":{"headline":"PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks","id":"CVE-2024-45292"},"products":["PhpSpreadsheet"],"published":"2024-10-07","related":[{"cvss_score":9.2,"headline":"PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load","id":"CVE-2026-34084","kev_date_added":null,"published":"2026-05-05"},{"cvss_score":8.8,"headline":"XML External Entity Reference (XXE) in PHPSpreadsheet","id":"CVE-2024-45048","kev_date_added":null,"published":"2024-08-28"},{"cvss_score":8.8,"headline":"XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue","id":"CVE-2019-12331","kev_date_added":null,"published":"2019-11-07"},{"cvss_score":8.8,"headline":"XXE in PHPSpreadsheet due to encoding issue","id":"CVE-2018-19277","kev_date_added":null,"published":"2018-11-14"},{"cvss_score":8.3,"headline":"PhpSpreadsheet vulnerable to unauthorized reflected XSS in the constructor of the Downloader class","id":"CVE-2024-56365","kev_date_added":null,"published":"2025-01-03"},{"cvss_score":8.3,"headline":"PhpSpreadsheet vulnerable to unauthorized reflected XSS in the Accounting.php file","id":"CVE-2024-56366","kev_date_added":null,"published":"2025-01-03"},{"cvss_score":8.3,"headline":"PhpSpreadsheet allows unauthorized reflected XSS in `Convert-Online.php` file","id":"CVE-2024-56408","kev_date_added":null,"published":"2025-01-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-07","vendors":["PHPOffice"]},"summary":"Attackers can disclose sensitive server files by uploading crafted XLSX files to applications using PHPSpreadsheet, bypassing XML security checks.","url":"https://insights.sbomify.com/CVE-2024-45293/"}