# GHSA-x4mq-m75f-mx8m: Delegate functions are missing `Send` bound

> Missing Send bounds in delegate functions can cause data races and undefined behavior in Rust applications using Windows bindings.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Jan 2022
- **Also known as:** RUSTSEC-2022-0008

## What is GHSA-x4mq-m75f-mx8m?

GHSA-x4mq-m75f-mx8m is a vulnerability in windows, published on 2 Jan 2022. 

### Official description

Affected versions of this crate did not require event handlers to have `Send` bound despite there being no guarantee of them being called on any particular thread, which can potentially lead to data races and undefined behavior.

The flaw was corrected in commit [afe3252](https://github.com/microsoft/windows-rs/commit/afe32525c22209aa8f632a0f4ad607863b51796a) by adding `Send` bounds.

## Which versions are affected by GHSA-x4mq-m75f-mx8m?

3 open source packages ship an affected version, including windows.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `windows` | crates.io | From 0.1.2 | 0.32.0 |
| `windows` | crates.io | From 0.1.2 | 0.32.0 |
| `windows` | crates.io | From 0.1.2 | 0.32.0 |

## How do I fix GHSA-x4mq-m75f-mx8m?

Upgrade windows to 0.32.0 or later.

## Is GHSA-x4mq-m75f-mx8m being exploited?

There is no known exploitation of GHSA-x4mq-m75f-mx8m in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x4mq-m75f-mx8m and fix it if it is affected.

What it is: GHSA-x4mq-m75f-mx8m is a vulnerability in windows, published on 2 Jan 2022. 
Exploitation: There is no known exploitation of GHSA-x4mq-m75f-mx8m in the wild and no public exploit code.

Affected packages and fixed versions:
- windows (crates.io): affected from 0.1.2; fixed in 0.32.0
- windows (crates.io): affected from 0.1.2; fixed in 0.32.0
- windows (crates.io): affected from 0.1.2; fixed in 0.32.0

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/GHSA-x4mq-m75f-mx8m/ (Markdown: https://insights.sbomify.com/GHSA-x4mq-m75f-mx8m/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x4mq-m75f-mx8m

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x4mq-m75f-mx8m/
Summaries are generated and may contain mistakes; the official description above is the record.
