MediumGHSA-363h-vj6q-3cmjCVE-2014-4671

Rosetta-Flash JSONP Vulnerability in hapi

Published 31 Aug 2020 · Updated 8 Nov 2023

Is your project on an affected hapi?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Affected package

hapinpm
Affected
<6.1.0
Fixed in
6.1.0
Update to the fixed version for your release line, for example:npm install hapi@6.1.0

Details

This description taken from the pull request provided by Patrick Kettner.

Versions 6.1.0 and earlier of hapi are vulnerable to a rosetta-flash attack, which can be used by attackers to send data across domains and break the browser same-origin-policy.

Recommendation

  • Update hapi to version 6.1.1 or later.

Alternatively, a solution previously implemented by Google, Facebook, and Github is to prepend callbacks with an empty inline comment. This will cause the flash parser to break on invalid inputs and prevent the issue, and how the issue has been resolved internally in hapi.

Is GHSA-363h-vj6q-3cmj in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected hapi, and gives you the command that fixes it.

More advisories for hapi

  • HighGHSA-7hx8-2rxv-66xvDenial of Service in hapi · 3 Sept 2020
  • MediumCVE-2015-9243Unsafe Merging of CORS Configuration Conflict in hapi · 1 Sept 2020
  • HighCVE-2017-16013Denial of Service via malformed accept-encoding header in hapi · 9 Oct 2018
  • MediumCVE-2015-9236Incorrect handling of CORS preflight request headers in hapi · 7 Jun 2018
  • HighCVE-2015-9241Denial of Service in hapi · 7 Jun 2018
  • HighCVE-2014-3742File Descriptor Leak Can Cause DoS Vulnerability in hapi · 24 Oct 2017
hapi security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.