CVE-2025-31366 Cross-site scripting in FortiOS

Medium 4.5 Published Updated

Unauthenticated attackers can execute reflected cross-site scripting via crafted HTTP requests in Fortinet network security products.

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-31366?

CVE-2025-31366 is a medium-severity cross-site scripting vulnerability in Fortinet Fortios, published on 14 Oct 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

An Improper Neutralization of Input During Web Page Generation vulnerability [CWE-79] vulnerability in Fortinet FortiOS 7.6.0 through 7.6.3, FortiOS 7.4.0 through 7.4.8, FortiOS 7.2 all versions, FortiOS 7.0 all versions, FortiOS 6.4 all versions, FortiProxy 7.6.0 through 7.6.3, FortiProxy 7.4 all versions, FortiProxy 7.2 all versions, FortiProxy 7.0 all versions, FortiSASE 25.2.a may allow an unauthenticated attacker to perform a reflected cross site scripting (XSS) via crafted HTTP requests.

Weakness: CWE-79

Which versions are affected by CVE-2025-31366?

It affects 3 products.

Products include Fortinet Fortios, Fortinet Fortiproxy, Fortinet Fortisase.

How do I fix CVE-2025-31366?

No fix has been published for CVE-2025-31366 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-31366 being exploited?

There is no known exploitation of CVE-2025-31366 in the wild and no public exploit code.

All Fortinet Fortios vulnerabilities

Sources

Also known as GHSA-8mjg-h7v2-89h4.

Is CVE-2025-31366 in your software?

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

Check your SBOMs for free