Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2023-42791: Relative path traversal and unrestricted file upload in Fortinet FortiManager and FortiAnalyzer

Published Feb 20, 2024 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS4.0%91st percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Fortinet
IdentifiersCVE-2023-42791CWE-23 · Relative Path Traversal

CVE-2023-42791 is a relative path traversal vulnerability involving unrestricted file upload in Fortinet FortiManager and FortiAnalyzer. A remote, authenticated attacker with low privileges can submit crafted HTTP requests to execute unauthorized code or commands. The configuration import upload functionality permits traversal-based file writes outside the intended upload location. A demonstrated exploitation chain combining this vulnerability with the CVE-2024-23666 authorization bypass achieves root-level code execution on the underlying FortiManager Linux system. Affected FortiManager versions include 7.4.0, 7.2.0–7.2.3, 7.0.0–7.0.8, 6.4.0–6.4.12, and 6.2.0–6.2.11.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits unauthorized code or command execution on an affected system. Traversal-based uploads can write attacker-controlled files outside the intended upload directory, including into the root filesystem. When combined with CVE-2024-23666 to expose configuration import functionality to a restricted user, demonstrated exploitation yields a root shell on FortiManager.

Mitigation

If you can’t patch tonight, do this now.

Until fixed releases can be installed, restrict management-interface access to trusted networks and users.

Remediation

Patch, then assume compromise.

Upgrade FortiManager to 7.4.1 or later, 7.2.4 or later, 7.0.9 or later, 6.4.13 or later, or 6.2.12 or later, according to the installed release branch. Upgrade FortiAnalyzer-BigData 7.2 to 7.2.6 or later. FortiAnalyzer-BigData 7.4 is not affected.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
CVE-2023-42791_CVE-2024-23666This repository contains two main Python scripts for exploiting vulnerabilities in FortiManager and related Fortinet products: 1. rce.py: This script exploits insufficient authorization and unrestricted file upload vulnerabilities (CVE-2023-42791, CVE-2024-23666) to achieve remote code execution or privilege escalation. It allows an attacker with valid (even low-privileged) credentials to upload a malicious shared library and supporting files to the target device. The exploit can either spawn a reverse shell (using a Python one-liner) or create a new administrator account by uploading crafted files and triggering their execution via manipulation of /etc/ld.so.preload. The script interacts with the FortiManager's web API endpoints over HTTPS. 2. ManagerGate.py: This script provides a way to connect to managed FortiGate SSH services via the FortiManager, leveraging credentials and device information. It uses asynchronous Python and websockets to interact with the FortiManager's internal APIs, allowing the attacker to open a shell on managed FortiGate devices (SSH password for the FortiGate is still required, but may be retrievable from FortiManager backups). The repository is well-structured, with clear separation between the two exploitation techniques. The README provides detailed usage instructions, affected versions, and references. The main attack vector is network-based, targeting FortiManager's web interface. Several fingerprintable endpoints are present, including specific API paths and file system locations on the target device. The exploit is operational, providing working payloads and automation for both reverse shell and privilege escalation scenarios.synacktiv · Disclosed Feb 12, 2025 · python · networkOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
FortinetFortianalyzeroperating_system
FortinetFortimanageroperating_system
FAQ

Frequently asked questions

Is CVE-2023-42791 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2023-42791 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2023-42791?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2023-42791, the earliest disclosed Feb 12, 2025.
Is there a patch for CVE-2023-42791?
Upgrade FortiManager to 7.4.1 or later, 7.2.4 or later, 7.0.9 or later, 6.4.13 or later, or 6.2.12 or later, according to the installed release branch. Upgrade FortiAnalyzer-BigData 7.2 to 7.2.6 or later.
What products are affected by CVE-2023-42791?
Fortinet Fortianalyzer and Fortinet Fortimanager.
How severe is CVE-2023-42791?
CVE-2023-42791 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 4.0% (91st percentile) as of Oct 16, 2026.
Activity feed

Recent activity

2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.