
Containerised PoC and lab for CVE-2026-121653: unauthenticated SQL injection in Ivanti Endpoint Manager Core status-event service leading to RCE via xp_cmdshell.
| CVE | CVE-2026-121653 |
| Component | Ivanti Endpoint Manager (EPM) — Core server, status-event web service (PatchBiz.dll → RecordGoodApp, published for the same defect class in ZDI-24-507 / CVE-2024-29824) |
| Affected | EPM 2024 SU7 and prior |
| Fixed in | EPM 2024 SU8 |
| CWE | CWE-89 (SQL injection) → CWE-78 (OS command injection through the database account) |
| Impact | Unauthenticated remote code execution on the EPM Core server, with the privileges of the Core database account; full read/write access to the EPM database |
| CVSS | 9.8 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Vector | POST /WSStatusEvents/EventHandler.asmx — the ASMX service the agents report to, SOAP 1.2, SOAPAction: http://tempuri.org/UpdateStatusEvents |
| Trigger | The <status> element of a status event (GoodApp=1|md5=<value>), i.e. the application identity an agent reports |
| Advisory | Ivanti security advisory, November 2026 (paired with CVE-2026-18128, CWE-319, cleartext transmission in the EPM Agent) |
| Credit | Ivanti's responsible disclosure programme; the upstream defect class was reported to Ivanti and published as ZDI-24-507 / CVE-2024-29824 |
The Ivanti Endpoint Manager Core publishes the status-event web service that the agents
report to. The record of a reported application reaches PatchBiz.dll /
RecordGoodApp, and the statement that stores it is assembled from the client-supplied
values instead of being parameterised. A remote attacker who can reach the service
therefore controls the SQL that the Core server runs against its Microsoft SQL Server
database. Because the database account of the Core server is privileged, the injection
escalates into operating-system command execution on the Core host — the same escalation
the published exploit chain performs with xp_cmdshell.
This repository contains a containerised laboratory that reproduces the flaw against a real Microsoft SQL Server, the differential against the patched build, the three published mitigations, and the results of a 0-day sweep over the patched line.
Every claim of this write-up is backed by a capture: evidence/INDEX.md maps each
claim to the file, the line and the literal text that establish it.
Ivanti Endpoint Manager Core is proprietary, Windows-only .NET Framework software. Its installer sits behind the Ivanti License System, it requires a Windows host and a licensed SQL Server, and the assembly that carries the defect cannot be redistributed or executed in a Linux container. What is reproducible here is therefore:
/WSStatusEvents, the
UpdateStatusEvents operation, the GoodApp=1|md5=… status element, and the
RecordGoodApp call chain — recovered from the published research on the same component
and the same defect class (ZDI-24-507, the Horizon3.ai deep dive and its proof of
concept);xp_cmdshell. xp_cmdshell is
a Windows feature and Microsoft SQL Server for Linux — the only SQL Server that runs in
a container — cannot provide it (measured, see §7). The laboratory therefore provides
the primitive explicitly and executes the injected command with the security context of
the SQL Server service account, which is the account xp_cmdshell uses on a Windows EPM
Core host.Everything the laboratory asserts about the vendor product is sourced from the advisory, from ZDI and from the published research; everything it asserts about the model is labelled as such. The model runs in the laboratory, and the vulnerable and the patched behaviour differ in the query construction alone.
ZDI-24-507 (CVE-2024-29824) describes the defect class of CVE-2026-121653 on the same component:
The specific flaw exists within the implementation of the
RecordGoodAppmethod. The issue results from the lack of proper validation of a user-supplied string before using it to construct SQL queries. An attacker can leverage this vulnerability to execute code in the context of the service account.
The Horizon3.ai deep dive of the same flaw located the statement construction in
PatchBiz.dll and the path that reaches it:
StatusEvents.EventHandler.UpdateStatusEvents [WebMethod], ASMX, hosted on /WSStatusEvents
└─ Patch.UpdateActionHistory
└─ AppMonitorAction.RecordPatchIssue
└─ PatchBiz.RecordGoodApp string.Format() puts goodApp.md5 into the SQL text
The request that reaches it carries the application identity in the <status> element of
the event:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<UpdateStatusEvents xmlns="http://tempuri.org/">
<deviceID>string</deviceID>
<actions>
<Action name="string" code="0" date="0" type="96" user="string"
configguid="string" location="string">
<status>GoodApp=1|md5=<attacker controlled></status>
</Action>
</actions>
</UpdateStatusEvents>
</soap12:Body>
</soap12:Envelope>
The model of the vulnerable build builds the statement that records the reported
application with string.Format, exactly the pattern ZDI describes
(lab/app/PatchBiz.cs):
/// 2024 SU7 model: the statement is assembled with string.Format and the user
/// supplied values are pasted into the text.
public static string BuildGoodAppSql(GoodApp app)
{
return string.Format(
"UPDATE AppTable SET Status = 'Good', LastSeen = GETDATE(), AgentPath = '{0}', " +
"ConfigGuid = '{1}', AgentUser = '{2}' " +
"WHERE MD5 = '{3}' AND DeviceID = '{4}'; " +
"IF @@ROWCOUNT = 0 " +
"INSERT INTO AppTable (MD5, Status, DeviceID, AgentPath, ConfigGuid, AgentUser, " +
"LastSeen, HistoryRecorded) " +
"VALUES ('{3}', 'Good', '{4}', '{0}', '{1}', '{2}', GETDATE(), 0);",
app.AgentPath, app.ConfigGuid, app.AgentUser, app.Md5, app.DeviceId);
}
The patched build keeps the same statement and binds the same values as parameters
(lab/app/PatchBiz.cs):
/// 2024 SU8 model: the same statement, but every value is bound as a parameter.
public const string GoodAppSqlParameterized =
"UPDATE AppTable SET Status = 'Good', LastSeen = GETDATE(), AgentPath = @agentpath, " +
"ConfigGuid = @configguid, AgentUser = @agentuser " +
"WHERE MD5 = @md5 AND DeviceID = @deviceid; " +
"IF @@ROWCOUNT = 0 " +
"INSERT INTO AppTable (MD5, Status, DeviceID, AgentPath, ConfigGuid, AgentUser, " +
"LastSeen, HistoryRecorded) " +
"VALUES (@md5, 'Good', @deviceid, @agentpath, @configguid, @agentuser, GETDATE(), 0);";
The value of goodApp.md5 lands inside a string literal of the statement. The payload
closes the literal, appends its own statements and comments the remainder of the line:
UPDATE AppTable SET Status = 'Good', ... WHERE MD5 = ''; <injected statements>; --' AND DeviceID = '...';
The published chain (horizon3ai/CVE-2024-29824) is: