CVE-2015-9236: Incorrect handling of CORS preflight request headers in hapi

hapi Updated 02 Oct 2025

Summary

07/06/2018
Yes i
Moderate
Not published

CVE-2015-9236: Incorrect handling of CORS preflight request headers in hapi. Affects hapi versions < 11.0.0. Fixed in 11.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The hapi package is a rich framework for building applications and services in Node.js. It provides a robust set of features for handling HTTP requests, routing, and more. However, versions prior to 11.0.0 have a vulnerability related to the incorrect handling of CORS preflight request headers.

Vulnerability Detail

Versions of hapi prior to 11.0.0 implement CORS incorrectly, allowing for configurations that can return inconsistent headers or even allow forbidden cross-origin activities. When a connection has CORS enabled but a specific route has it turned off, and the route is not a GET request, the OPTIONS prefetch request will return the default CORS headers. However, the subsequent actual request will go through without any CORS headers, defeating the purpose of enabling CORS on the route.

How To Fix

Latest published version: 18.1.0 as of 22 Oct 2026

npm install hapi@18.1.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

11.0.0

This is the first release that contains the fix.

npm install hapi@11.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The hapi package prior to version 11.0.0 has a vulnerability related to the incorrect handling of CORS preflight request headers. It is recommended to update to the latest version of hapi to ensure secure and consistent CORS behavior. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for hapi →

Share this vulnerability

FAQ

Hapi is a rich framework for building applications and services in Node.js. It provides a robust set of features for handling HTTP requests, routing, and more.

CORS (Cross-Origin Resource Sharing) is a mechanism that allows resources on a web page to be requested from another domain outside the domain from which the resource originated.

The incorrect handling of CORS preflight request headers can lead to inconsistent or insecure cross-origin activities. This can potentially expose sensitive data or allow unauthorized access to resources.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for hapi.

How To Fix

Latest published version: 18.1.0 as of 22 Oct 2026

npm install hapi@18.1.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

11.0.0

This is the first release that contains the fix.

npm install hapi@11.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback