Rosetta-Flash JSONP Vulnerability in hapi
Published 31 Aug 2020 · Updated 8 Nov 2023
Affected package
- Affected
- <6.1.0
- Fixed in
- 6.1.0
npm install hapi@6.1.0Details
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
- Advisorynvd.nist.gov/vuln/detail/CVE-2014-4671
- Linkgithub.com/spumko/hapi/pull/1766
- Linkgithub.com/hapijs/hapi/commit/d47f57abf23bdaa84f61aed2bac94ae5f358afb7
- Linkgithub.com/patrickkettner
- Packagegithub.com/spumko/hapi
- Linkwww.npmjs.com/advisories/12
- Linkhelpx.adobe.com/security/products/flash-player/apsb14-17.html
- Linkmiki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash
- Linkrhn.redhat.com/errata/RHSA-2014-0860.html
- Linksecunia.com/advisories/59774
- Linksecunia.com/advisories/59837
- Linksecurity.gentoo.org/glsa/glsa-201407-02.xml
- Linkwww.securityfocus.com/bid/68457
- Linkwww.securitytracker.com/id/1030533
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.