1. Archivio CVE
  2. 2026
  3. CVE-2026-27977

CVE-2026-27977

5.4 Gravità media CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N 5.4 – Media

Descrizione

Next.js is a React framework for building full-stack web applications. Starting in version 16.0.1 and prior to version 16.1.7, in `next dev`, cross-site protection for internal websocket endpoints could treat `Origin: null` as a bypass case even if `allowedDevOrigins` is configured, allowing privacy-sensitive/opaque contexts (for example sandboxed documents) to connect unexpectedly. If a dev server is reachable from attacker-controlled content, an attacker may be able to connect to the HMR websocket channel and interact with dev websocket traffic. This affects development mode only. Apps without a configured `allowedDevOrigins` still allow connections from any origin. The issue is fixed in version 16.1.7 by validating `Origin: null` through the same cross-site origin-allowance checks used for other origins. If upgrading is not immediately possible, do not expose `next dev` to untrusted networks and/or block websocket upgrades to `/_next/webpack-hmr` when `Origin` is `null` at the proxy.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
vercel next.js >= 16.0.1 < 16.1.7 node.js
Tutte le 72 vulnerabilità di Vercel Next.js

Tipo di vulnerabilità

CWE-1385 Missing Origin Validation in WebSockets

The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.

Impatto sui sistemi

AmbitoImpatto
Riservatezza, Integrità, Disponibilità, Non ripudio, Controllo degli accessi Dipende dal contesto, Ottenere privilegi o assumere un’altra identità, Aggirare i meccanismi di protezione, Leggere i dati dell’applicazione, Modificare i dati dell’applicazione, Interruzione del servizio: arresto o riavvio

Come si previene

Sviluppo Enable CORS-like access restrictions by verifying the 'Origin' header during the WebSocket handshake.
Sviluppo Use a randomized CSRF token to verify requests.
Sviluppo Use TLS to securely communicate using 'wss' (WebSocket Secure) instead of 'ws'.
Architettura e progettazione · Sviluppo Require user authentication prior to the WebSocket connection being established. For example, the WS library in Node has a 'verifyClient' function.
Sviluppo Leverage rate limiting to prevent against DoS. Use of the leaky bucket algorithm can help with this.
Sviluppo Use a library that provides restriction of the payload size. For example, WS library for Node includes 'maxPayloadoption' that can be set.
Sviluppo Treat data/input as untrusted in both directions and apply the same data/input sanitization as XSS, SQLi, etc.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 37 CVE di tipo CWE-1385, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org