Skip to main content
Mallory
HighCISA KEVExploited in the wildPublic exploit

Path Traversal in Fortinet FortiOS CLI

IdentifiersCVE-2022-41328CWE-22· Improper Limitation of a Pathname…

CVE-2022-41328 is an improper limitation of a pathname to a restricted directory (path traversal) vulnerability in Fortinet FortiOS. A privileged attacker can use crafted CLI commands to escape intended filesystem restrictions and read from or write to arbitrary files on the underlying Linux system. Reported affected versions include all FortiOS 6.0 and 6.2 releases, FortiOS 6.4.0 through 6.4.11, FortiOS 7.0.0 through 7.0.9, and FortiOS 7.2.0 through 7.2.3. Fortinet and subsequent reporting indicate the flaw was exploited in highly targeted attacks, including activity where attackers attempted arbitrary file upload and replacement of system files on FortiGate devices, and in some cases modified firmware components such as /sbin/init and added implants such as /bin/fgfm to obtain persistence and remote access.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation allows a privileged attacker to read and write arbitrary files on the FortiGate underlying OS, which can lead to compromise of device integrity and confidentiality. Observed impacts included unauthorized file replacement, firmware tampering, persistence through modified boot components, remote shell capability, file upload/download, and data exfiltration. In reported incidents, exploitation contributed to OS and file corruption, data loss, and devices entering FIPS error mode and failing to boot after integrity self-test failures.

Mitigation

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

If immediate patching is not possible, restrict and closely monitor privileged CLI access and administrative pathways, especially in environments where FortiManager can execute scripts against managed FortiGate devices. Audit for unexpected file writes, firmware image changes, startup-script modifications, and indicators such as altered /sbin/init, added /bin/fgfm, suspicious FortiManager script activity, and related IOCs published by Fortinet. Isolate potentially affected devices, review FortiManager trust relationships and script execution history, and perform integrity verification of firmware and managed appliances. These measures reduce exposure but do not replace upgrading to fixed versions.

Remediation

Patch, then assume compromise.

Upgrade FortiOS to a fixed release. Fortinet-recommended remediations are FortiOS 6.4.12 or later, 7.0.10 or later, and 7.2.4 or later; unsupported affected branches such as 6.0 and 6.2 should be migrated to supported fixed versions. Review Fortinet PSIRT advisory FG-IR-22-369 / Advisory #2023-32 and apply associated indicators of compromise and incident response guidance. Because exploitation has been associated with firmware and boot-chain modification, organizations should validate device integrity and reimage or replace compromised systems rather than relying solely on patching if compromise is suspected.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

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
FortinetFortiosoperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence6

Every observed campaign linking this CVE to a named adversary.

Associated malware2

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity1

Community discussion across Reddit, Mastodon, and other social sources.