Detect Fortinet FortiClient EMS SQL Injection Exploitation (CVE-2026-21643) in Splunk
Detects exploitation attempts targeting a SQL injection vulnerability in Fortinet FortiClient EMS (CVE-2026-21643). This KEV-listed vulnerability allows unauthenticated or authenticated attackers to inject malicious SQL statements into FortiClient EMS, potentially enabling data exfiltration, authentication bypass, or remote code execution via database-level commands such as xp_cmdshell.
MITRE ATT&CK
SPL Detection Query
index=* (sourcetype="forticlient:ems" OR sourcetype="iis" OR sourcetype="wineventlog:application" OR source="*forticlient*")
| eval sql_injection_indicators=if(
match(coalesce(_raw, ""), "(?i)(\' OR |\' AND |UNION SELECT|1=1|xp_cmdshell|EXEC\(|CAST\(|CONVERT\(|WAITFOR DELAY|SLEEP\(|DROP TABLE|INSERT INTO|--|\/\*)"),
1, 0
)
| where sql_injection_indicators=1
| eval source_ip=coalesce(src_ip, c_ip, src, "unknown")
| eval target_host=coalesce(dest_host, host, cs_host, "unknown")
| eval detection_source=case(
sourcetype=="forticlient:ems", "FortiClient EMS Log",
sourcetype=="iis", "IIS Web Log",
sourcetype=="wineventlog:application", "Windows Application Event",
true(), "Other"
)
| stats count as attempt_count, earliest(_time) as first_seen, latest(_time) as last_seen, values(detection_source) as sources by source_ip, target_host
| eval cve="CVE-2026-21643", severity="critical", vendor="Fortinet", product="FortiClient EMS"
| where attempt_count >= 1
| sort - attempt_count Detects SQL injection attempts targeting FortiClient EMS via pattern matching across EMS logs, IIS access logs, and Windows Application event logs. Aggregates by source IP to surface scanning and exploitation attempts.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Authorized penetration testing or red team engagements against EMS infrastructure
- Vulnerability scanners (Nessus, Qualys, Rapid7) performing SQL injection checks
- Legitimate application traffic containing SQL-like strings in data fields
- SIEM or log aggregation tools that may forward partial SQL error messages
Other platforms for CVE-2026-21643
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1FortiClient EMS SQL Injection - Error-Based Detection
Expected signal: IIS log entry with 500 status code and SQL injection characters in cs-uri-query field; MSSQL Event ID 8152 or syntax error in ERRORLOG
- Test 2FortiClient EMS SQL Injection - UNION SELECT Data Extraction Simulation
Expected signal: IIS POST log with UNION SELECT in request body (cs-bytes > 0); MSSQL log showing column mismatch error if column count incorrect
- Test 3FortiClient EMS SQL Injection - xp_cmdshell RCE Simulation (Endpoint Telemetry)
Expected signal: Windows Security Event ID 4688 showing cmd.exe or whoami.exe spawned from sqlservr.exe; MSSQL audit log showing xp_cmdshell execution; CrowdStrike ProcessRollup2 event for cmd.exe with parent sqlservr.exe
- Test 4FortiClient EMS SQL Injection - Time-Based Blind Injection (WAITFOR DELAY)
Expected signal: IIS log showing POST request with 5+ second response time (sc-time-taken > 5000); network connection held open for duration of delay; no error response body
Unlock Pro Content
Get the full detection package for CVE-2026-21643 including response playbook, investigation guide, and atomic red team tests.