CVE-2025-5301 Reflected Cross-Site Scripting in ONLYOFFICE Docs (DocumentServer)

Medium 6.1 Published Updated

Attackers can inject malicious scripts via crafted HTTP POST requests in ONLYOFFICE Docs, potentially leading to code execution or account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-5301?

CVE-2025-5301 is a medium-severity cross-site scripting vulnerability in OnlyOffice Docs (DocumentServer), published on 12 Jun 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

ONLYOFFICE Docs (DocumentServer) in versions equal and below 8.3.1 are affected by a reflected cross-site scripting (XSS) issue when opening files via the WOPI protocol. Attackers could inject malicious scripts via crafted HTTP POST requests, which are then reflected in the server's HTML response.

Weakness: CWE-79

Which versions are affected by CVE-2025-5301?

How do I fix CVE-2025-5301?

No fix has been published for CVE-2025-5301 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-5301 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5301 exists.

Public exploit code: 1 Nuclei template.

Sources

Also known as GHSA-r5fg-8fjv-3w9h.

Is CVE-2025-5301 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free