{"answers":{"affected":"10 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-2025-22131 exists.","fix":"Upgrade phpoffice/phpspreadsheet to a fixed version for your release line: 1.29.8, 2.1.7, 2.3.6 or 3.8.0.","what":"CVE-2025-22131 is a medium-severity cross-site scripting vulnerability in PHPOffice PhpSpreadsheet, published on 20 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-22131 and fix it if it is affected.\n\nWhat it is: CVE-2025-22131 is a medium-severity cross-site scripting vulnerability in PHPOffice PhpSpreadsheet, published on 20 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-22131 exists.\n\nAffected packages and fixed versions:\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.29.8\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.29.8\n- phpoffice/phpspreadsheet (Packagist): affected from 2.0.0; fixed in 2.1.7\n- phpoffice/phpspreadsheet (Packagist): affected from 2.0.0; fixed in 2.1.7\n- phpoffice/phpspreadsheet (Packagist): affected from 2.2.0; fixed in 2.3.6\n- phpoffice/phpspreadsheet (Packagist): affected from 2.2.0; fixed in 2.3.6\n- phpoffice/phpspreadsheet (Packagist): affected from 3.0.0; fixed in 3.8.0\n- phpoffice/phpspreadsheet (Packagist): affected from 3.0.0; fixed in 3.8.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-2025-22131/ (Markdown: https://insights.sbomify.com/CVE-2025-22131/index.md)","id":"CVE-2025-22131","markdown":"https://insights.sbomify.com/CVE-2025-22131/index.md","name":"CVE-2025-22131","record":{"aliases":["GHSA-79xx-vf93-p7cx"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP spreadsheet library","requires_auth":"none","summary":"Attackers can inject malicious scripts via XLSX files when converted to HTML, potentially executing code in user browsers.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"phpspreadsheet","vendor":"phpoffice"}],"cvss":{"score":5.1,"severity":"medium","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Cross-Site Scripting (XSS) vulnerability in the code which translates the XLSX file into a HTML representation and displays it in the response.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":"2025-09-03","github_poc":2,"max_poc_stars":3,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-09-05T05:59:17Z","kind":"github_poc","ref":"https://github.com/s0ck37/CVE-2025-22131-POC","stars":3,"title":"POC for the vuln CVE-2025-22131"},{"date":"2025-09-03T06:26:03Z","kind":"github_poc","ref":"https://github.com/ZzN1NJ4/CVE-2025-22131-PoC","stars":1,"title":"PoC for CVE-2025-22131"}],"tier":"weaponised"},"has_fix":true,"headline":"Cross-Site Scripting (XSS) vulnerability in generateNavigation() function","id":"CVE-2025-22131","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":10,"n_references":2,"next":{"headline":"WeGIA has a Cross-Site Scripting (XSS) in File Upload Field","id":"CVE-2025-22132"},"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":null,"source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["1.29.8"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["1.29.8"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["2.1.7"],"introduced":["2.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["2.1.7"],"introduced":["2.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["2.3.6"],"introduced":["2.2.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["2.3.6"],"introduced":["2.2.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["3.8.0"],"introduced":["3.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-79xx-vf93-p7cx"},{"ecosystem":"Packagist","fixed":["3.8.0"],"introduced":["3.0.0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-79xx-vf93-p7cx"}],"prev":{"headline":"Soft Serve allows path traversal attacks","id":"CVE-2025-22130"},"products":["PhpSpreadsheet"],"published":"2025-01-20","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":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-21","vendors":["PHPOffice"]},"summary":"Attackers can inject malicious scripts via XLSX files when converted to HTML, potentially executing code in user browsers.","url":"https://insights.sbomify.com/CVE-2025-22131/"}