/

CVE-2025-64155

Severity:

CRITICAL RISK

(9.8)

OS Command Injection in Fortinet FortiSIEM TCP Request

CVE-2025-64155

Modified

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical OS command injection vulnerability in Fortinet FortiSIEM allows specially crafted TCP requests to inject and execute system-level commands on the underlying host.

When user-controlled data from network requests is concatenated into shell commands without proper neutralization, an attacker can gain unauthorized code execution and full control over the affected FortiSIEM system.

Affected context

This vulnerability affects Fortinet FortiSIEM deployments in the following versions:

  • 7.4.0
  • 7.3.0 through 7.3.4
  • 7.1.0 through 7.1.8
  • 7.0.0 through 7.0.4
  • 6.7.0 through 6.7.10

It appears in components that process TCP-based input and then construct OS-level commands using values derived from those requests. The issue manifests when network-facing functionality passes untrusted parameters directly or indirectly into a shell or command interpreter without robust validation or escaping. Any FortiSIEM instance exposed to untrusted networks, or where TCP access is not tightly controlled, is at heightened risk.

Exploit preconditions

  • Attack surface: Network-exposed FortiSIEM services that accept and parse TCP requests.
  • Required access: Ability to initiate TCP connections to the vulnerable FortiSIEM port(s); no prior authentication may be required depending on deployment.
  • Trigger point: Sending crafted TCP payloads that inject shell metacharacters or additional command fragments into parameters ultimately used by OS-level command execution.
  • Why exploitation is possible: User-controlled data from TCP requests is incorporated into command strings without proper neutralization or use of parameterized, non-shell-based execution APIs, allowing the attacker to break out of the intended command context and execute arbitrary commands.

Why this happens

The root cause aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'). Application logic builds shell or system commands by concatenating or interpolating values derived from network input into a command string executed by a command interpreter (e.g., /bin/sh). Because special characters (such as command separators, redirection operators, or subshell syntax) are not adequately filtered, escaped, or rejected, the command interpreter processes attacker-supplied fragments as additional commands rather than as inert data. This insecure pattern arises when developers rely on shell parsing for convenience instead of using safer APIs that treat input strictly as parameters.

Potential impact

  • Remote execution of arbitrary OS commands under the privileges of the FortiSIEM process.
  • Full compromise of the FortiSIEM host, including data exfiltration, tampering, or deletion.
  • Disabling, evading, or falsifying security monitoring and SIEM functionality.
  • Use of the FortiSIEM system as a pivot point for lateral movement across the network.
  • Installation of persistent malware or backdoors on the affected system.

General mitigation guidance

Effective mitigation typically focuses on eliminating direct shell command construction from untrusted input and narrowing the trust boundary around network data:

  • Replace shell-based execution with high-level, parameterized process execution APIs that never invoke a shell or require manual escaping.
  • Strictly validate and constrain all external input used to influence OS-level operations, using allowlists of permitted values and formats rather than attempting to blacklist dangerous characters.
  • Remove or refactor features that dynamically assemble command lines from TCP request fields where feasible, preferring internal APIs or library calls to perform the same functions.
  • Run FortiSIEM and related components with the minimum OS privileges required, and segment them on the network to limit blast radius in case of compromise.
  • Apply network-level controls (firewalls, ACLs, VPNs) to restrict access to the vulnerable TCP services to only trusted administrative or internal sources.

How teams detect issues like this

Organizations can approach detection using a combination of code-centric and operational techniques:

  • Static analysis and code review: Search for patterns where user- or network-derived data flows into command execution functions (e.g., popen, system, exec variants, or shell wrappers) and where a shell is implicitly or explicitly invoked. Flag string concatenation or formatting operations that build command lines using unvalidated input.
  • Security review checklists: Require that any code path issuing OS commands demonstrates strict input validation and avoids shell interpreters where possible. Pay close attention to logging, diagnostic, and integration modules that may wrap system utilities.
  • Runtime monitoring: Monitor FortiSIEM hosts for anomalous child processes, unexpected command-line arguments, or shells spawned by the application. Endpoint detection and response tools can surface suspicious process trees originating from FortiSIEM services.
  • Network-based detection: Inspect TCP traffic for unusual or malformed payloads targeting FortiSIEM ports, especially those containing shell metacharacters or patterns indicative of command injection attempts.

Sources

SourceLink
fortiguard.fortinet.comfortiguard.fortinet.com/psirt/FG-IR-25-772
github.comgithub.com/horizon3ai/CVE-2025-64155
github.comgithub.com/purehate/CVE-2025-64155-hunter

Frequently asked

questions

Exploitability depends on how the affected FortiSIEM service is exposed. If the vulnerable TCP port is reachable from untrusted networks and no strong access controls are in place, an attacker may be able to exploit the issue remotely with relatively low effort.

The description suggests that crafted TCP requests alone may be sufficient, implying that authentication is not strictly required in all configurations. However, actual requirements can vary by deployment, network segmentation, and any additional protections placed in front of the FortiSIEM service.

The most robust fix is to remove shell command construction from user-controlled data paths entirely. Use parameterized process execution APIs that avoid the shell, strictly constrain inputs to approved values, and minimize the number of code paths that issue OS-level commands.

Adopt a defensive coding standard that forbids direct shell invocation with untrusted input, mandates allowlist-based input validation for any value influencing OS commands, and integrates security reviews and static analysis focused on command execution APIs into the development lifecycle. Combined with least-privilege deployment and network segmentation, these practices significantly reduce the risk of OS command injection.

Find out what's already
exploitable in your codebase.