CVE-2015-9236 Incorrect handling of CORS preflight request headers in hapi
Incorrect CORS implementation in Hapi allows bypassing route-specific restrictions, enabling unauthorized cross-origin requests when CORS is disabled on specific routes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2015-9236?
CVE-2015-9236 is a medium-severity vulnerability in HackerOne hapi node module, published on 31 May 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Hapi versions less than 11.0.0 implement CORS incorrectly and allowed for configurations that at best returned inconsistent headers and at worst allowed cross-origin activities that were 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.
Which versions are affected by CVE-2015-9236?
2 open source packages ship an affected version, including hapi. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
hapi npm | All versions | 11.0.0 |
hapi npm | All versions | 11.0.0 |
Products include Hapijs Hapi.
How do I fix CVE-2015-9236?
Upgrade hapi to 11.0.0 or later.
Is CVE-2015-9236 being exploited?
There is no known exploitation of CVE-2015-9236 in the wild and no public exploit code.
Other vulnerabilities in HackerOne hapi node module
Sources
Also known as GHSA-vwrf-r5r4-7775.