Fortinet WAF: Detect POST to /api/v2.0/user/remoteserver.saml (CVE-2021-22123 attempt)

Flags suspicious Fortinet WAF HTTP POST requests targeting a remoteserver.saml API query pattern consistent with CVE-2021-22123 exploitation.

FreeReviewedSigma · Critical · v5
Category
webserver
Author
Bhabesh Raj, Florian Roth (SigmaHQ), DRL 1.1
Published
2021-08-19
Updated
2026-07-31
title: "Fortinet WAF: Detect POST to /api/v2.0/user/remoteserver.saml (CVE-2021-22123 attempt)"
id: 83e89ac3-a930-46a8-be15-976f086cf406
status: test
description: This rule flags HTTP requests where the URI query contains /api/v2.0/user/remoteserver.saml and the method is POST. It matters because such traffic can indicate an exploitation attempt against Fortinet WAF components targeting CVE-2021-22123 behavior. The detection relies on webserver access log fields for request method, URI query, and the presence or absence of specific referrer values.
references:
  - https://www.rapid7.com/blog/post/2021/08/17/fortinet-fortiweb-os-command-injection
  - https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2021/Exploits/CVE-2021-22123/web_cve_2021_22123_fortinet_exploit.yml
author: Bhabesh Raj, Florian Roth, Huntrule Team
date: 2021-08-19
modified: 2023-01-02
tags:
  - attack.initial-access
  - attack.t1190
  - cve.2021-22123
  - detection.emerging-threats
logsource:
  category: webserver
detection:
  selection:
    cs-uri-query|contains: /api/v2.0/user/remoteserver.saml
    cs-method: POST
  filter1:
    cs-referer|contains: /root/user/remote-user/saml-user/
  filter2:
    cs-referer: null
  condition: selection and not filter1 and not filter2
falsepositives:
  - Unknown
level: critical
license: DRL-1.1
related:
  - id: f425637f-891c-4191-a6c4-3bb1b70513b4
    type: derived