Microsoft.PowerShell.Commands.Diagnostics is vulnerable to Denial of service
25
CVE Score
Low
Denial of service
When Get-Counter is run without -Counter, it localizes its built-in default counter paths through PdhHelper.TranslateLocalCounterPath, which calls LookupPerfNameByIndex. If PdhLookupPerfNameByIndex returns PDH_MORE_DATA, that method frees the native buffer with Marshal.FreeHGlobal and allocates a larger one with Marshal.AllocHGlobal. If that allocation throws, the finally block frees the stale pointer again and can crash the process. The fix assigns IntPtr.Zero to localizedPathPtr after the first free so a failed reallocation is not freed twice.
Upgrade the Microsoft.PowerShell.Commands.Diagnostics library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you run Get-Counter without -Counter on Windows, which localizes the built-in default counter paths through PdhHelper.LookupPerfNameByIndex.
6.0.4 - 7.4.19
Fixed in 7.4.207.5.0 - 7.5.10
Fixed in 7.5.117.6.0 - 7.6.5
Fixed in 7.6.6Microsoft.PowerShell.Commands.Diagnostics is vulnerable to Denial of service in versions 6.0.4 - 7.4.19, 7.5.0 - 7.5.10 and 7.6.0 - 7.6.5.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.