Security researchers created a demonstration of a critical flaw in Fortinet’s FortiClient Enterprise Management Server (EMS) software.
The security flaw CVE-2023-48788 is an SQL injection in the DB2 Administration Server (DAS) discovered and reported by the UK’s National Cyber Security Centre (NCSC).
It impacts FortiClient EMS versions 7.0 (7.0.1-7.0.10) and 7.2 (7.2.0-7.2.2), allowing unauthenticated threat actors to gain remote code execution (RCE) with SYSTEM privileges on unpatched servers using low-complexity attacks that don’t need user interaction.
“An improper neutralization of special elements used in an SQL Command (‘SQL Injection’) vulnerability [CWE-89] in FortiClientEMS may allow an unauthenticated attacker to execute unauthorized code or commands via specifically crafted requests,” Fortinet explains in a security advisory released last week.
While the company didn’t initially mention that CVE-2023-48788 was being used in attacks, it has since silently updated the advisory to say that the “vulnerability is exploited in the wild.”
On Thursday, security researchers with Horizon3’s Attack Team shared a method to confirm if a system is vulnerable without providing remote code execution capabilities.
To use Horizon3’s exploit code in RCE attacks, you need to modify the PoC to use the Microsoft SQL Server xp_cmdshell procedure. This will spawn a Windows command shell for code execution.
“To turn this SQL injection vulnerability into remote code execution we used the built-in xp_cmdshell functionality of Microsoft SQL Server,” Horizon3 vulnerability researcher James Horseman said.
“Initially, the database was not configured to run the xp_cmdshell command, however it was trivially enabled with a few other SQL statements.”
There are more than 440 exposed FortiClient Enterprise Management Server (EMS) servers tracked by Shodan, with over 300 of them found by the Shadowserver threat monitoring service, mostly in the United States.
In February, Fortinet patched another critical RCE bug (CVE-2024-21762) in the FortiOS operating system and FortiProxy secure web proxy, saying it was “potentially being exploited in the wild.”
However, the very next day, CISA confirmed that the CVE-2024-21762 bug was being actively exploited and directed federal agencies to secure their FortiOS and FortiProxy devices within seven days.
Source: FortiGuards Lab, Bleeping Computer