# CVE-2023-21768: Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability

> An attacker can exploit a flaw in the Windows Ancillary Function Driver for WinSock 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:** No
- **Published:** 10 Jan 2023
- **Updated:** 1 Jan 2025
- **Also known as:** GHSA-j69v-7pj3-vg67

## What is CVE-2023-21768?

CVE-2023-21768 is a high-severity vulnerability in Microsoft Windows 11, published on 10 Jan 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability

Weakness: CWE-822 (Untrusted Pointer Dereference)

## Which versions are affected by CVE-2023-21768?

It affects 2 products.


Products: Microsoft Windows 11, Microsoft Windows Server 2022.

## How do I fix CVE-2023-21768?

No fix has been published for CVE-2023-21768 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-21768 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-21768 exists.

Public exploit code:

- LPE exploit for CVE-2023-21768 (github_poc): https://github.com/chompie1337/Windows_LPE_AFD_CVE-2023-21768
- Using CVE-2023-21768 to manual map kernel mode driver  (github_poc): https://github.com/SamuelTulach/nullmap
- Windows_AFD_LPE_CVE-2023-21768 (github_poc): https://github.com/Malwareman007/CVE-2023-21768
- cve-2023-21768 (github_poc): https://github.com/cl4ym0re/cve-2023-21768-compiled
- CVE-2023-21768 Windows 11 22H2 系统本地提权 POC (github_poc): https://github.com/P4x1s/CVE-2023-21768-POC
- https://github.com/zoemurmure/CVE-2023-21768-AFD-for-WinSock-EoP-exploit (github_poc): https://github.com/zoemurmure/CVE-2023-21768-AFD-for-WinSock-EoP-exploit

## Other vulnerabilities in Microsoft Windows 11

- [CVE-2022-35804](https://insights.sbomify.com/CVE-2022-35804/): SMB Client and Server Remote Code Execution Vulnerability (high 8.8)
- [CVE-2022-29133](https://insights.sbomify.com/CVE-2022-29133/): Windows Kernel Elevation of Privilege Vulnerability (high 8.8)
- [CVE-2021-38672](https://insights.sbomify.com/CVE-2021-38672/): Windows Hyper-V Remote Code Execution Vulnerability (high 8.0)
- [CVE-2022-44710](https://insights.sbomify.com/CVE-2022-44710/): DirectX Graphics Kernel Elevation of Privilege Vulnerability (high 7.8)
- [CVE-2022-21996](https://insights.sbomify.com/CVE-2022-21996/): Win32k Elevation of Privilege Vulnerability (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-21768 and fix it if it is affected.

What it is: CVE-2023-21768 is a high-severity vulnerability in Microsoft Windows 11, published on 10 Jan 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-21768 exists.

Affected product: Microsoft Windows 11. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2023-21768/ (Markdown: https://insights.sbomify.com/CVE-2023-21768/index.md)
```

## Sources

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

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