# PhpSpreadsheet has an Unauthenticated Cross-Site-Scripting (XSS) in sample file

Advisory record · `GHSA-v66g-p9x6-v98p`

- **Identifiers:** `GHSA-v66g-p9x6-v98p` · `CVE-2024-45060` · `PKSA-1p4c-ysfb-v9ph` · `PKSA-dvbq-8ft2-ngrw`
- **State:** Confirmed
- **Severity:** CVSS 7.1 High
- **Critical:** No
- **Weakness (CWE):** [CWE-79](https://cwe.mitre.org/data/definitions/79.html)
- **Tags:** [Cross-site scripting (XSS)](https://agentprime.io/advisories/tag/xss.md)
- **Published:** 7 Oct 2024
- **Updated:** 6 Mar 2025
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 7 Oct 2024, 14:43 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `phpoffice/phpspreadsheet` (Packagist): affected `>=2.2.0, <2.3.0 || <1.29.2 || >=2.0.0, <2.1.1`; fixed in `2.3.0`, `1.29.2`, `2.1.1`
- `phpoffice/phpexcel` (Packagist): affected `<=1.8.2`; no fixed version yet

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Affected versions of phpoffice/phpspreadsheet are below 1.29.2, from 2.0.0 up to 2.1.1, and from 2.2.0 up to 2.3.0. The flaw is a cross-site scripting issue in a sample script, 45_Quadratic_equation_solver.php, which places user input directly into formulas. An unauthenticated attacker who can reach that script in a browser can get JavaScript to run by submitting crafted input. Upgrade to 1.29.2, 2.1.1, or 2.3.0; phpoffice/phpexcel is also listed as affected with no fixed version given. Sample files should not be deployed, so removing them is also advisable.

Written 4 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.1 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0051, the 44th percentile, on 23 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:27 UTC: First seen by agentprime
- 31 Oct 2026, 14:27 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-v66g-p9x6-v98p)

## Sources

- [GitHub Advisory Database: GHSA-v66g-p9x6-v98p](https://github.com/advisories/GHSA-v66g-p9x6-v98p)
- [OSV: GHSA-v66g-p9x6-v98p](https://osv.dev/vulnerability/GHSA-v66g-p9x6-v98p)
- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-v66g-p9x6-v98p>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45060>
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/3990173db1207767139e63d33783beafada57007>
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/bc74f3aa1d76f191c6c7c3631e286abb25c38759>
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/fb42a103f14cfce258c836b31f4a71f1fb1a9747>
- <https://github.com/PHPOffice/PhpSpreadsheet>
- <https://github.com/PHPOffice/PhpSpreadsheet/blob/d50b8b5de7e30439fb57eae7df9ea90e79fa0f2d/samples/Basic/45_Quadratic_equation_solver.php#L56>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-v66g-p9x6-v98p>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-v66g-p9x6-v98p/>. Everything for agents: <https://agentprime.io/llms.txt>.
