Incorrect handling of CORS preflight request headers in hapi
Versions of hapi prior to 11.0.0 implement CORS incorrectly, allowing for configurations that at best return inconsistent headers, and at worst allow cross-origin activities that are expected to be forbidden.
If the connection has CORS enabled but one route has it off, and the route is not GET, the OPTIONS prefetch request will return the default CORS headers and then the actual request will go through and return no CORS headers. This defeats the purpose of turning CORS on the route.
Recommendation
Update to version 11.0.0 or later.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | hapi | < 11.0.0 | 11.0.0 |
Referencias
- Debilidad (CWE)
CWE-284- Plataforma
- npm
- Paquete
hapi- Publicada
- 07.06.2018
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-vwrf-r5r4-7775 - CC BY 4.0
Historial de vulnerabilidades: hapi
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 7
- Primera → última
- 10.2017 09.2020
- Sin corrección
- 1
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 4
- Media 3
Divulgaciones por año
- 2017: 1
- 2018: 3
- 2019: 0
- 2020: 3
- 2021: 0
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Incorrect handling of CORS preflight request headers in hapi esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.