GHSA-2ggq-vfcp-gwhj Cross-Site Scripting in @hapi/boom
Attackers can execute arbitrary JavaScript in victims' browsers via unescaped error messages in the @hapi/boom library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-2ggq-vfcp-gwhj?
GHSA-2ggq-vfcp-gwhj is a cross-site scripting vulnerability in @hapi/boom, published on 4 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Versions of @hapi/boom prior to 0.3.8 are vulnerable to Cross-Site Scripting (XSS). The package fails to properly escape error messages, which may allow attackers to execute arbitrary JavaScript in a victim's browser.
Recommendation
Upgrade to version 0.3.8 or later.
Which versions are affected by GHSA-2ggq-vfcp-gwhj?
2 open source packages ship an affected version, including @hapi/boom.
| Package | Affected | Fixed in |
|---|---|---|
@hapi/boom npm | All versions | 0.3.8 |
@hapi/boom npm | All versions | 0.3.8 |
How do I fix GHSA-2ggq-vfcp-gwhj?
Upgrade @hapi/boom to 0.3.8 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-2ggq-vfcp-gwhj being exploited?
There is no known exploitation of GHSA-2ggq-vfcp-gwhj in the wild and no public exploit code.