Critical CVSS 9.8 EPSS 0.75365 🔬 Patch diffed 2024-07 archive

Executive Summary

None

Overview

9.8
CVSS CRITICAL
Critical
MS Severity
Not Exploited
MS Exploit Status
Less Likely
MS Exploit Likelihood
Category Remote Code Execution
Released Jul 9 2024
Last Updated Jul 9 2024
Publicly Disclosed No
CISA KEV Not Listed
Known Exploits None Known
EPSS Score 0.75365 — 0.99473 percentile
NVD CVSS 9.8 CRITICAL — matches MSRC

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
ATTACK VECTOR
Network
ATTACK COMPLEXITY
Low
PRIVILEGES REQUIRED
None
USER INTERACTION
None
SCOPE
Unchanged
CONFIDENTIALITY
High
INTEGRITY
High
AVAILABILITY
High
EXPLOIT CODE MATURITY
Unproven
REMEDIATION LEVEL
Official Fix
REPORT CONFIDENCE
Confirmed
Temporal Score: 8.5

EPSS Score

0.75365
probability of exploitation in the next 30 days
0.99473 percentile - updated 2026-08-14
View on FIRST.org

Affected Products

11 affected products
Product KB Article Severity Impact Restart Required
Windows Server 2008 for 32-bit Systems Service Pack 2 5040499 (Monthly Rollup) 5040490 (Security Only) Critical Remote Code Execution 5039245 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.0.6003.22769 Yes 5040499 5040490 Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation) 5040499 (Monthly Rollup) 5040490 (Security Only) Critical Remote Code Execution 5039245 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.0.6003.22769 Yes 5040499 5040490 Windows Server 2008 for x64-based Systems Service Pack 2 5040499 (Monthly Rollup) 5040490 (Security Only) Critical Remote Code Execution 5039245 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.0.6003.22769 Yes 5040499 5040490 Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation) 5040499 (Monthly Rollup) 5040490 (Security Only) Critical Remote Code Execution 5039245 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.0.6003.22769 Yes 5040499 5040490 Windows Server 2008 R2 for x64-based Systems Service Pack 1 5040497 (Monthly Rollup) 5040498 (Security Only) Critical Remote Code Execution 5039289 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.1.7601.27219 Yes 5040497 5040498 Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation) 5040497 (Monthly Rollup) 5040498 (Security Only) Critical Remote Code Execution 5039289 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 6.1.7601.27219 Yes 5040497 5040498 Windows Server 2012 5040485 (Monthly Rollup) Critical Remote Code Execution Yes
Windows Server 2012 (Server Core installation) 5040485 (Monthly Rollup) Critical Remote Code Execution Yes
Windows Server 2012 R2 5040456 (Monthly Rollup) Critical Remote Code Execution Yes
Windows Server 2012 R2 (Server Core installation) 5040456 (Monthly Rollup) Critical Remote Code Execution Yes
Windows Server 2016 5040434 (Security Update) Critical Remote Code Execution Yes
Windows Server 2016 (Server Core installation) 5040434 (Security Update) Critical Remote Code Execution Yes
Windows Server 2019 5040430 (Security Update) Critical Remote Code Execution Yes
Windows Server 2019 (Server Core installation) 5040430 (Security Update) Critical Remote Code Execution Yes
Windows Server 2022 5040437 (Security Update) Critical Remote Code Execution Yes
Windows Server 2022 (Server Core installation) 5040437 (Security Update) Critical Remote Code Execution Yes
Windows Server 2022, 23H2 Edition (Server Core installation) 5040438 (Security Update) Critical Remote Code Execution Yes

Patches

6 patches
Article Type Restart
5040485 Monthly Rollup Yes
5040456 Monthly Rollup Yes
5040434 Security Update Yes
5040430 Security Update Yes
5040437 Security Update Yes
5040438 Security Update Yes

Patch Diff

ghidriff · lserver.dll (KB5040430)

MadLicense: pre-auth, 0-click heap overflow in the Windows Server Remote Desktop Licensing service (lserver.dll). CDataCoding::DecodeData allocates a fixed-size heap buffer (HeapAlloc(hHeap, 8, DAT_0); 21 bytes per the MadLicense research) and decodes a caller-supplied Base24 string into it in a loop bounded only by the string's NUL terminator - the encoded length is never checked against the allocation. Each carry-producing base-24 digit advances the write index and writes _Dst[idx] with no bound, overflowing the buffer with attacker-influenced bytes. Reachable pre-auth via RPC TLSRpcTelephoneRegisterLKP (opnum 49, DCERPC/TCP 135) in the NT AUTHORITY\NETWORK SERVICE process; CVSS 9.8. IN-HOUSE ghidriff diff of Server 2019 10.0.17763.5830 -> .6054 shows the July 2024 fix is TWO layers: (1) a bounds check (DAT_0 <= idx) added at both write sites in DecodeData, GATED behind CFR flag Feature_1932091707_50631810 - with the flag off the patched binary still overflows; (2) a new RPC security callback TLSRpcSecurityCallback, registered via RpcServerRegisterIf2, that rejects callers below RPC_C_AUTHN_LEVEL_PKT_PRIVACY (6) with a registry opt-out DisableWorkgroupAuthEnforcement - this is the layer that removes the pre-auth reachability.

Pre-patch version 10.0.17763.5830 Download
Post-patch version 10.0.17763.6054 Download
Function Address Change Note
CDataCoding::DecodeData 180057db0 -> 1800584d8 code (bounds check added, CFR-gated) Pre-patch: fixed-size HeapAlloc(_,8,DAT_0) buffer, decode loop `for (; *param_1 != 0; ...)`, trailing `_Dst[uVar1] = (byte)(uVar4 >> 8)` with no bound. Post-patch adds `EvaluateCurrentState(&g_Feature_1932091707_50631810...)` and `if (iVar2 != 0 && DAT_0 <= idx) goto error` at BOTH write sites (inner loop and carry write). Length 284 -> 361; match ratio 0.4/b_ratio 0.85. The guard fires only when the feature flag is enabled.
TLSRpcSecurityCallback 1800062a0 (new) added (RPC auth enforcement) New function, not present pre-patch. Registered on the RDL interface via RpcServerRegisterIf2 (newly imported). Uses RpcServerInqCallAttributesW to require auth level 6 (RPC_C_AUTHN_LEVEL_PKT_PRIVACY) over ncalrpc/ncacn_np/ncacn_ip_tcp; honours registry opt-out DisableWorkgroupAuthEnforcement under System\CurrentControlSet\Policies. Removes the pre-auth reachability that made the bug 9.8.
TLSRpcTelephoneRegisterLKP entry (RPC opnum 49) Unauthenticated DCERPC method that passes the attacker-controlled Base24 string to DecodeData. After the patch it sits behind TLSRpcSecurityCallback.
View full diff report View RCA report

Attack Path

A fixed-size heap buffer is decoded into with no length check, overflowing from an unauthenticated RPC call

Attack path for CVE-2024-38077 A fixed-size heap buffer is decoded into with no length check, overflowing from an unauthenticated RPC call 01 — ENTRY Remote attacker reaches the RD Licensing RPC endpoint - no authentication DCERPC over TCP 135 to a server running the Remote Desktop Licensing role. AV:N, PR:N, UI:N - a single internet-exposed RDL server is the whole requirement (0-click). The July patch adds TLSRpcSecurityCallback here to reject unauthenticated callers. 02 — CONTROLLED INPUT Calls TLSRpcTelephoneRegisterLKP (opnum 49) with a long Base24 string The encoded string is a fully attacker-controlled RPC stub parameter; both its length and content are chosen by the attacker. 03 — PATH CDataCoding::DecodeData allocates a fixed-size buffer and decodes into it HeapAlloc(hHeap, 8, DAT_0) - 21 bytes per MadLicense. The decode loop runs `for (; *param_1 != NUL; ...)`, one base-24 digit at a time. 04 — MISSING CHECK The loop is bounded only by the NUL terminator, never by the allocation size Each carry-producing digit does `_Dst[uVar1] = ...` with no check that idx < DAT_0. A long enough string advances the write index past the allocation. The July fix adds exactly this comparison (DAT_0 <= idx) - but gated behind CFR flag Feature_1932091707_50631810. 05 — PRIMITIVE Controlled heap overflow in the NETWORK SERVICE process -> pre-auth RCE Attacker-controlled bytes overrun adjacent heap. The MadLicense research leaks heap/function addresses to defeat ASLR, bypasses CFG, and pivots to code execution (e.g. LoadLibraryA against a remote SMB payload). CVSS 9.8; triggerable even on Server 2025 with LFH Delay-Free via free-then-delay grooming.

Derived from the patch delta: the checks added by the vendor identify which fields crossed a trust boundary unvalidated. Reachability and privilege are taken from the call chain in the RCA report.

Known Exploits

Acknowledgments