PowerShell Version 2 Enabled
The Windows PowerShell 2.0 engine is installed, so attackers can run PowerShell without the logging and anti-malware scanning that later versions provide.
| Severity | Low |
| CVSS 3.1 | 3.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N Open in the calculator |
| CVSS 4.0 | 4.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-424: Improper Protection of Alternate Path |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1689 Downgrade Attack, T1059.001 PowerShell |
| Category | Security Misconfiguration |
Description
The deprecated Windows PowerShell 2.0 engine is still installed as an optional Windows feature alongside the current version. PowerShell 2.0 does not support script block logging, the Antimalware Scan Interface (AMSI) that lets endpoint protection inspect scripts, or the constrained language mode that application control applies to later versions.
Anyone who can run PowerShell, such as an attacker who can already run commands on the host as any user, can start the old engine with powershell.exe -Version 2 and run scripts and tools that these controls would otherwise record or block, a technique known as a downgrade attack. Without script block logging and without AMSI scanning, malicious activity is less likely to be detected or blocked, and the attacker can step outside the constrained language mode that application control applies to PowerShell. The weakness grants no access or privilege on its own.
The engine depends on .NET Framework 3.5, so it can start only where that is also installed, although .NET Framework 3.5 is often added for older applications. Microsoft deprecated PowerShell 2.0 in 2017 and has since begun removing it from Windows. The weakness is identified with Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root on client versions of Windows or Get-WindowsFeature PowerShell-V2 on Windows Server, and confirmed by starting the old engine and checking $PSVersionTable.
Remediation
Remove the PowerShell 2.0 engine from every host where no application depends on it, through configuration management, Intune or the build process:
- Where an application still needs PowerShell 2.0, plan its upgrade and keep the old engine only on the hosts that run it.
- Remove .NET Framework 3.5 where no application needs it, which also prevents the old engine from starting.
- Enable PowerShell script block logging, forward the events centrally, and alert on process command lines that request version 2, which detects downgrade attempts on hosts not yet fixed.
Confirm the fix by checking the feature state and by running powershell.exe -Version 2, which should no longer start a version 2 session.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.