# GHSA-vx74-f528-fxqg: github.com/nghttp2/nghttp2 has HTTP/2 Rapid Reset

> Attackers can cause denial of service by rapidly creating and cancelling HTTP/2 streams, affecting applications using the nghttp2 library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Oct 2023

## What is GHSA-vx74-f528-fxqg?

GHSA-vx74-f528-fxqg is a denial of service vulnerability in github.com/nghttp2/nghttp2, published on 10 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

Rapidly creating and cancelling streams (HEADERS frame immediately followed by RST_STREAM) without bound cause denial of service.

See https://www.cve.org/CVERecord?id=CVE-2023-44487 for details.

### Patches

nghttp2 v1.57.0 mitigates this vulnerability by default.

### Workarounds

If upgrading to nghttp2 v1.57.0 is not possible, implement `nghttp2_on_frame_recv_callback`, and check and count RST_STREAM frames.  If excessive number of RST_STREAM are received, then take action, such as dropping connection silently, or call `nghttp2_submit_goaway` and gracefully terminate the connection.

### References

The following commit mitigates this vulnerability:

- https://github.com/nghttp2/nghttp2/commit/72b4af6143681f528f1d237b21a9a7aee1738832

## Which versions are affected by GHSA-vx74-f528-fxqg?

2 open source packages ship an affected version, including github.com/nghttp2/nghttp2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/nghttp2/nghttp2` | Go | All versions | 1.57.0 |
| `github.com/nghttp2/nghttp2` | Go | All versions | 1.57.0 |

## How do I fix GHSA-vx74-f528-fxqg?

Upgrade github.com/nghttp2/nghttp2 to 1.57.0 or later.

## Is GHSA-vx74-f528-fxqg being exploited?

There is no known exploitation of GHSA-vx74-f528-fxqg in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-vx74-f528-fxqg and fix it if it is affected.

What it is: GHSA-vx74-f528-fxqg is a denial of service vulnerability in github.com/nghttp2/nghttp2, published on 10 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-vx74-f528-fxqg in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/nghttp2/nghttp2 (Go): affected all versions; fixed in 1.57.0
- github.com/nghttp2/nghttp2 (Go): affected all versions; fixed in 1.57.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-vx74-f528-fxqg/ (Markdown: https://insights.sbomify.com/GHSA-vx74-f528-fxqg/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-vx74-f528-fxqg

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