GHSA-vwrf-r5r4-7775

Suggest an improvement
Source
https://github.com/advisories/GHSA-vwrf-r5r4-7775
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/06/GHSA-vwrf-r5r4-7775/GHSA-vwrf-r5r4-7775.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vwrf-r5r4-7775
Aliases
  • CVE-2015-9236
Published
2018-06-07T19:43:25Z
Modified
2023-11-08T03:58:04Z
Summary
Incorrect handling of CORS preflight request headers in hapi
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-284"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-06-16T21:58:39Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / hapi

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
11.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/06/GHSA-vwrf-r5r4-7775/GHSA-vwrf-r5r4-7775.json"