CVE-2025-31366 in FortiOSinfo

Summary

by MITRE • 10/14/2025

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.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 01/14/2026

This vulnerability represents a critical web application security flaw classified as CWE-79, which specifically addresses the improper neutralization of input during web page generation. The issue affects a broad range of Fortinet products including FortiOS versions 6.4 through 7.6, FortiProxy across multiple versions, and FortiSASE 25.2.a, creating a widespread attack surface for potential exploitation. The vulnerability manifests as a reflected cross site scripting flaw that allows unauthenticated attackers to inject malicious scripts into web pages viewed by victims. This particular weakness occurs when the application fails to properly sanitize or encode user input before incorporating it into dynamically generated web content, creating an environment where malicious payloads can be executed within the context of a victim's browser session.

The technical implementation of this vulnerability involves the exploitation of HTTP request parameters that are reflected back to users without adequate input validation or output encoding. Attackers can craft specially designed HTTP requests containing malicious script code that gets processed by the vulnerable Fortinet appliance and subsequently reflected back to the victim's browser. When the victim's browser renders this reflected content, the embedded malicious scripts execute in the context of the victim's session, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of the user. This type of attack aligns with the ATT&CK framework's tactic of initial access through web application attacks, specifically leveraging the technique of reflected cross site scripting to establish a foothold within the target environment.

The operational impact of this vulnerability extends beyond simple script execution, as it can enable sophisticated attack chains where attackers leverage the XSS capability to perform more advanced malicious activities. An attacker could potentially use this vulnerability to steal session cookies, redirect users to malicious sites, deface web interfaces, or even escalate privileges within the compromised system. The widespread nature of affected versions means that organizations with multiple Fortinet appliances across different security layers may be simultaneously vulnerable, creating cascading security risks throughout their network infrastructure. This vulnerability particularly threatens organizations that rely heavily on Fortinet appliances for network security, as these devices often serve as critical components in protecting network perimeters and internal systems from external threats.

Organizations should prioritize immediate remediation through official Fortinet security patches and updates released for the affected versions. The mitigation strategy should include implementing web application firewalls to detect and block suspicious HTTP requests, deploying input validation controls at network boundaries, and conducting comprehensive security assessments to identify any potential exploitation attempts. Additionally, organizations should consider implementing content security policies to prevent script execution in web browsers, regularly monitoring network traffic for indicators of exploitation attempts, and establishing incident response procedures specifically addressing cross site scripting vulnerabilities. The vulnerability demonstrates the critical importance of proper input sanitization and output encoding practices in web application development, aligning with industry best practices outlined in OWASP top ten security risks and the NIST cybersecurity framework for protecting against web application threats.

Responsible

Fortinet

Reservation

03/28/2025

Disclosure

10/14/2025

Moderation

accepted

CPE

ready

EPSS

0.00021

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!