Safeguard
Vulnerability Analysis•

CVE-2021-32589: High Use After Free in FortiManager and FortiAnalyzer

CVE-2021-32589 is a use after free in the fgfmsd daemon of FortiManager and FortiAnalyzer, giving root code execution. Upgrade to the fixed release.

Safeguard Security Team
3 min read

CVE-2021-32589 is a high severity (CVSS 8.1) use after free in the fgfmsd daemon of Fortinet FortiManager and FortiAnalyzer. An unauthenticated remote attacker could run code as root by sending a crafted request to the fgfm port. Fortinet lists fixed releases for each branch.

What's affected

  • FortiManager and FortiAnalyzer 7.0.0: upgrade to 7.0.1 or above.
  • 6.4.0 through 6.4.5: upgrade to 6.4.6 or above. 6.2.0 through 6.2.7: upgrade to 6.2.8 or above.
  • 6.0.0 through 6.0.10: upgrade to 6.0.11 or above. 5.6.0 through 5.6.10: upgrade to 5.6.11 or above.
  • FortiManager and FortiAnalyzer 5.4 (all versions) and 5.2, 5.0 or 5.3: Fortinet says migrate to a fixed release.
  • Fortinet lists the same fix for FortiPortal branches in the same advisory (FG-IR-21-067). The NVD record names only FortiManager and FortiAnalyzer, so read the advisory for FortiPortal.
  • The record rates it High, with high attack complexity. KEV status: false.

How to check if you're exposed

Log in to the management interface and read the firmware version from the system dashboard. Compare it with the list above. Then check whether the fgfm port, used for the management protocol between FortiGate devices and the manager, is reachable from untrusted networks.

The advisory also lists specific hardware models for the FortiAnalyzer case, so read it for the model scope.

What to do now

  1. Upgrade each affected branch to the fixed release listed in the advisory, or migrate off end of support branches.
  2. Restrict the fgfm port to the managed devices that need it, using access controls on a network firewall.
  3. Take a configuration backup before the upgrade and test with a non production device if you have one.
  4. After upgrading, review administrator accounts, scheduled tasks and logs for unexpected activity.
  5. Plan migration of any 5.x installations, since Fortinet offers no fix for them.

Why it matters

The class is CWE-416, use after free. The program frees a block of memory, but later code still uses the pointer. If an attacker can place their own data in the freed block, the program may act on it, and in some cases that leads to code execution. The advisory says a specially crafted request to the fgfm port is enough, with no login.

Management platforms hold credentials and configuration for many other devices. A compromise of the manager can become a compromise of every device it controls, so access to its management ports should be limited to the smallest set of sources.

Quick check

Do I need to be logged in?

No. The record says a remote, non authenticated attacker.

What about version 5.4?

Fortinet lists 5.4 as affected in all versions and says to migrate to a fixed release.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.