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

Rosetta-Flash JSONP Vulnerability in hapi

Published 31 Aug 2020 · Updated 8 Nov 2023

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.

References

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