# CVE-2026-7768: @fastify/accepts-serializer vulnerable to Denial of Service via Unbounded Accept Header Cache Growth

> Remote attackers can crash the application by exhausting memory through unbounded cache growth caused by varied Accept headers in the Fastify accepts-serializer plugin.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 May 2026
- **Updated:** 4 May 2026
- **Also known as:** GHSA-qxhc-wx3p-2wmg

## What is CVE-2026-7768?

CVE-2026-7768 is a high-severity denial of service vulnerability in @fastify/accepts-serializer, published on 4 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

@fastify/accepts-serializer cached serializer-selection results keyed by the request Accept header without a size limit or eviction policy. A remote unauthenticated client could send many distinct but matching Accept header variants to make the cache grow unbounded, eventually exhausting the Node.js heap and crashing the process. Versions <= 6.0.3 are affected. Update to 6.0.4 or later, which bounds the cache via an LRU with a default size of 100 entries, configurable through the new cacheSize plugin option.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2026-7768?

2 open source packages ship an affected version, including @fastify/accepts-serializer. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@fastify/accepts-serializer` | npm | All versions | 6.0.4 |
| `@fastify/accepts-serializer` | npm | All versions | 6.0.4 |

Products: Fastify Fastify\/Accepts-Serializer.

## How do I fix CVE-2026-7768?

Upgrade @fastify/accepts-serializer to 6.0.4 or later.

## Is CVE-2026-7768 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-7768 and fix it if it is affected.

What it is: CVE-2026-7768 is a high-severity denial of service vulnerability in @fastify/accepts-serializer, published on 4 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-7768 in the wild and no public exploit code.

Affected packages and fixed versions:
- @fastify/accepts-serializer (npm): affected all versions; fixed in 6.0.4
- @fastify/accepts-serializer (npm): affected all versions; fixed in 6.0.4

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

## Sources

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

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