ghsa-vwrf-r5r4-7775
Vulnerability from github
Published
2018-06-07 19:43
Modified
2020-08-31 18:09
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.

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "hapi"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "11.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2015-9236"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-284"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:58:39Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "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. \n\nIf 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.\n\n\n## Recommendation\n\nUpdate to version 11.0.0 or later.",
  "id": "GHSA-vwrf-r5r4-7775",
  "modified": "2020-08-31T18:09:06Z",
  "published": "2018-06-07T19:43:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-9236"
    },
    {
      "type": "WEB",
      "url": "https://github.com/hapijs/hapi/issues/2840"
    },
    {
      "type": "WEB",
      "url": "https://github.com/hapijs/hapi/issues/2850"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-vwrf-r5r4-7775"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/45"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Incorrect handling of CORS preflight request headers in hapi"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…