CVE-2023-36906 — Windows Cryptographic Services Information Disclosure Vulnerability
Executive Summary
None
Overview
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 10 for 32-bit Systems | 5029259 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 for x64-based Systems | 5029259 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 1607 for 32-bit Systems | 5029242 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 1607 for x64-based Systems | 5029242 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 1809 for 32-bit Systems | 5029247 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 1809 for ARM64-based Systems | 5029247 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5029247 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 21H2 for 32-bit Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5029244 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 11 version 21H2 for ARM64-based Systems | 5029253 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 11 version 21H2 for x64-based Systems | 5029253 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 11 Version 22H2 for ARM64-based Systems | 5029263 (Security Update) |
Important | Information Disclosure | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5029263 (Security Update) |
Important | Information Disclosure | Yes |
| Windows Server 2008 for 32-bit Systems Service Pack 2 5029318 (Monthly Rollup) 5029301 (Security Only) Important Information Disclosure 5028222 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.0.6003.22216 Yes 5029318 5029301 Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation) 5029318 (Monthly Rollup) 5029301 (Security Only) Important Information Disclosure 5028222 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.0.6003.22216 Yes 5029318 5029301 Windows Server 2008 for x64-based Systems Service Pack 2 5029318 (Monthly Rollup) 5029301 (Security Only) Important Information Disclosure 5028222 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.0.6003.22216 Yes 5029318 5029301 Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation) 5029318 (Monthly Rollup) 5029301 (Security Only) Important Information Disclosure 5028222 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.0.6003.22216 Yes 5029318 5029301 Windows Server 2008 R2 for x64-based Systems Service Pack 1 5029296 (Monthly Rollup) 5029307 (Security Only) Important Information Disclosure 5028240 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.1.7601.26664 Yes 5029296 5029307 Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation) 5029296 (Monthly Rollup) 5029307 (Security Only) Important Information Disclosure 5028240 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.1.7601.26664 Yes 5029296 5029307 Windows Server 2012 5029295 (Monthly Rollup) 5029308 (Security Only) Important Information Disclosure 5028232 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.2.9200.24414 Yes None Windows Server 2012 (Server Core installation) 5029295 (Monthly Rollup) 5029308 (Security Only) Important Information Disclosure 5028232 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.2.9200.24414 Yes None Windows Server 2012 R2 5029312 (Monthly Rollup) 5029304 (Security Only) Important Information Disclosure 5028228 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.3.9600.21503 Yes None Windows Server 2012 R2 (Server Core installation) 5029312 (Monthly Rollup) 5029304 (Security Only) Important Information Disclosure 5028228 Base: 5.5 Temporal: 4.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C 6.3.9600.21503 Yes None Windows Server 2016 | 5029242 (Security Update) |
Important | Information Disclosure | Yes |
| Windows Server 2016 (Server Core installation) | 5029242 (Security Update) |
Important | Information Disclosure | Yes |
| Windows Server 2019 | 5029247 (Security Update) |
Important | Information Disclosure | Yes |
| Windows Server 2019 (Server Core installation) | 5029247 (Security Update) |
Important | Information Disclosure | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5029259 |
Security Update | Yes |
5029242 |
Security Update | Yes |
5029247 |
Security Update | Yes |
5029244 |
Security Update | Yes |
5029253 |
Security Update | Yes |
5029263 |
Security Update | Yes |
Patch Diff
Out-of-bounds read / information disclosure (CWE-170 Improper Null Termination) in the Microsoft Software Key Storage Provider ncryptprov.dll, reachable from an AppContainer sandbox via the CNG Key Isolation RPC (keyiso.dll in lsass). The client-defined 'Use Context' provider property is stored by SPCryptSetProviderProperty at exactly the client-supplied length with NO null terminator, but read back by SPCryptGetProviderProperty as a wide string: `do { ++i; } while (*(WORD*)(buf + 2*i));` scans for a NUL with no bound, then memcpy returns 2*i+2 bytes. If the stored content has no embedded null, the scan runs past the allocation and returns adjacent lsass heap to the caller. k0shl used this to leak a provider-object pointer (defeating ASLR/CFG) to bootstrap the CVE-2023-28229 CNG UAF into lsass code execution / sandbox escape. IN-HOUSE ghidriff of ncryptprov.dll 10.0.22621.1928 -> .2134 (Aug 8 2023) confirms the fix: SPCryptSetProviderProperty now bounds-checks size (<= 0x7ffffffd), allocates _Size+2, and writes a 0x0000 WCHAR terminator at buf[_Size & ~1] before memcpy - so the stored property is always NUL-terminated and the read-side scan stays in bounds. SPCryptSetKeyProperty gets the same hardening (5% match). Unconditional fix (no feature flag). keyiso.dll was RULED OUT: SrvCryptGetProviderProperty is byte-identical across .819/.1555/.1992. Credit: k0shl of Kunlun Lab. Chains with CVE-2023-28229.
| Function | Address | Change | Note |
|---|---|---|---|
SPCryptSetProviderProperty |
96% match |
code (null-termination + bound added, unconditional) | Pre: RtlAllocateHeap(_, 0, _Size) stores the client 'Use Context' buffer with no terminator. Post: adds `if (param_3 == 0 || 0x7ffffffd < uVar3) goto error`, allocates `_Size + 2`, writes `*(WORD*)(buf + (param_4 & 0xfffffffe)) = 0` (NUL terminator), then memcpy(buf, param_3, _Size). Guarantees the stored property is NUL-terminated so the SPCryptGetProviderProperty read-back scan cannot over-read. |
SPCryptSetKeyProperty |
5% match (heavily rewritten) |
code (same null-termination hardening for key properties) | Rewritten alongside the provider-property fix to apply the same terminate-on-store handling to the key-property path. |
SPCryptGetProviderProperty |
unchanged (read/leak site) |
vulnerable sink (not modified) | Reads the stored property as a wide string, scanning for a NUL with no bound (do{++i;}while(*(WORD*)(buf+2*i))) then memcpy 2*i+2 bytes. The fix is on the store side, so this read site is unchanged - which is why a read-side-only or keyiso-only search misses the fix. |
Attack Path
A 'Use Context' KSP property is stored without a null terminator, so reading it back as a string over-reads adjacent lsass heap
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.