CVE-2022-41335

8.8 HIGH

📋 TL;DR

This CVE-2022-41335 is a relative path traversal vulnerability in Fortinet products that allows authenticated attackers to read and write arbitrary files on the underlying Linux system via crafted HTTP requests. It affects FortiOS, FortiProxy, and FortiSwitchManager with specific vulnerable versions. Attackers with valid credentials can potentially access sensitive system files or deploy malicious payloads.

💻 Affected Systems

Products:
  • FortiOS
  • FortiProxy
  • FortiSwitchManager
Versions: FortiOS: 7.2.0-7.2.2, 7.0.0-7.0.8, <6.4.10; FortiProxy: 7.2.0-7.2.1, 7.0.0-7.0.7, <2.0.10; FortiSwitchManager: 7.2.0, <7.0.0
Operating Systems: Linux-based Fortinet OS
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated attacker access; affects both GUI and CLI management interfaces.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise including credential theft, backdoor installation, data exfiltration, and lateral movement within the network.

🟠

Likely Case

Unauthorized file access leading to configuration theft, credential harvesting, and potential privilege escalation.

🟢

If Mitigated

Limited impact due to network segmentation, strong authentication controls, and restricted file permissions.

🌐 Internet-Facing: HIGH - Internet-facing Fortinet devices with vulnerable versions are directly exposed to authenticated attackers.
🏢 Internal Only: MEDIUM - Internal systems still vulnerable but require attacker to have network access and valid credentials.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires valid credentials but uses simple path traversal techniques; likely to be incorporated into attack frameworks.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FortiOS 7.2.3, 7.0.9, 6.4.10; FortiProxy 7.2.2, 7.0.8, 2.0.10; FortiSwitchManager 7.2.1, 7.0.1

Vendor Advisory: https://fortiguard.com/psirt/FG-IR-22-391

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Download appropriate firmware from Fortinet support portal. 3. Upload firmware via GUI or CLI. 4. Reboot device after installation. 5. Verify version update.

🔧 Temporary Workarounds

Restrict Administrative Access

all

Limit management interface access to trusted IP addresses only

config system interface
edit <interface_name>
set allowaccess https ssh
set trust-ip-1 <trusted_ip>
end

Enable Multi-Factor Authentication

all

Require MFA for all administrative accounts to reduce credential compromise risk

config user local
edit <username>
set two-factor email/fortitoken
end

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Fortinet devices from critical systems
  • Enable comprehensive logging and monitoring for unusual file access patterns

🔍 How to Verify

Check if Vulnerable:

Check current version via CLI: 'get system status' and compare with affected versions list

Check Version:

get system status | grep Version

Verify Fix Applied:

Verify version is patched: 'get system status' should show version >= FortiOS 7.2.3/7.0.9/6.4.10, FortiProxy 7.2.2/7.0.8/2.0.10, or FortiSwitchManager 7.2.1/7.0.1

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns in system logs
  • Multiple failed authentication attempts followed by successful login
  • HTTP requests with '../' sequences in URLs

Network Indicators:

  • Unusual outbound connections from Fortinet devices
  • HTTP requests to management interfaces with path traversal patterns

SIEM Query:

source="fortinet" AND (url="*../*" OR action="file*" AND result="success")

🔗 References

📤 Share & Export