# CVE-2022-26788: PowerShell Elevation of Privilege Vulnerability

> An attacker can exploit a vulnerability in PowerShell to elevate privileges on affected Windows systems.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Apr 2022
- **Updated:** 2 Jan 2025
- **Also known as:** BIT-powershell-2022-26788, GHSA-q7x5-x7rr-2859

## What is CVE-2022-26788?

CVE-2022-26788 is a high-severity vulnerability in Microsoft Windows 10, published on 15 Apr 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

PowerShell Elevation of Privilege Vulnerability

## Which versions are affected by CVE-2022-26788?

7 open source packages ship an affected version, including Microsoft.PowerShell.SDK and powershell. It affects 10 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.0.0-preview.1 | 7.0.10 |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.0.0-preview.1 | 7.0.10 |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.1.0-preview.1 | 7.1.7 |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.1.0-preview.1 | 7.1.7 |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.2.0-preview.1 | 7.2.3 |
| `Microsoft.PowerShell.SDK` | NuGet | From 7.2.0-preview.1 | 7.2.3 |
| `powershell` | Bitnami | From 7.0.0 | 7.0.10, 7.1.7, 7.2.3 |

Products: Microsoft Powershell, Microsoft Windows 10, Microsoft Windows 11, Microsoft Windows 8.1, Microsoft Windows Rt 8.1, Microsoft Windows Server 2008, Microsoft Windows Server 2012, Microsoft Windows Server 2016, Microsoft Windows Server 2019, Microsoft Windows Server 2022.

## How do I fix CVE-2022-26788?

Upgrade Microsoft.PowerShell.SDK to a fixed version for your release line: 7.0.10, 7.1.7 or 7.2.3.

## Is CVE-2022-26788 being exploited?

There is no known exploitation of CVE-2022-26788 in the wild and no public exploit code.

## Other vulnerabilities in Microsoft Windows 10

- [CVE-2018-8327](https://insights.sbomify.com/CVE-2018-8327/): Code injection in PowerShell Editor (critical 9.8)
- [CVE-2026-96251](https://insights.sbomify.com/CVE-2026-96251/): Microsoft PowerShell Remote Code Execution Vulnerability (high 8.8)
- [CVE-2026-70337](https://insights.sbomify.com/CVE-2026-70337/): Microsoft PowerShell Remote Code Execution Vulnerability (high 8.8)
- [CVE-2022-41076](https://insights.sbomify.com/CVE-2022-41076/): PowerShell Remote Code Execution Vulnerability (high 8.5)
- [CVE-2026-50523](https://insights.sbomify.com/CVE-2026-50523/): Microsoft PowerShell Remote Code Execution Vulnerability (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-26788 and fix it if it is affected.

What it is: CVE-2022-26788 is a high-severity vulnerability in Microsoft Windows 10, published on 15 Apr 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-26788 in the wild and no public exploit code.

Affected packages and fixed versions:
- Microsoft.PowerShell.SDK (NuGet): affected from 7.0.0-preview.1; fixed in 7.0.10
- Microsoft.PowerShell.SDK (NuGet): affected from 7.0.0-preview.1; fixed in 7.0.10
- Microsoft.PowerShell.SDK (NuGet): affected from 7.1.0-preview.1; fixed in 7.1.7
- Microsoft.PowerShell.SDK (NuGet): affected from 7.1.0-preview.1; fixed in 7.1.7
- Microsoft.PowerShell.SDK (NuGet): affected from 7.2.0-preview.1; fixed in 7.2.3
- Microsoft.PowerShell.SDK (NuGet): affected from 7.2.0-preview.1; fixed in 7.2.3
- powershell (Bitnami): affected from 7.0.0; fixed in 7.0.10, 7.1.7, 7.2.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-26788/ (Markdown: https://insights.sbomify.com/CVE-2022-26788/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-26788
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-26788
- OSV: https://osv.dev/vulnerability/CVE-2022-26788

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-26788/
Summaries are generated and may contain mistakes; the official description above is the record.
