GHSA-c53x-wwx2-pg96 Cross-Site Scripting in @berslucas/liljs
Attackers can execute arbitrary JavaScript in victims' browsers via unsanitized input in the liljs 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-c53x-wwx2-pg96?
GHSA-c53x-wwx2-pg96 is a cross-site scripting vulnerability in @berslucas/liljs, published on 3 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 @berslucas/liljs prior to 1.0.2 are vulnerable to Cross-Site Scripting (XSS). The package uses the unsafe innerHTML function without sanitizing input, which may allow attackers to execute arbitrary JavaScript on the victim's browser.
Recommendation
Upgrade to version 1.0.2 or later.
Which versions are affected by GHSA-c53x-wwx2-pg96?
2 open source packages ship an affected version, including @berslucas/liljs.
| Package | Affected | Fixed in |
|---|---|---|
@berslucas/liljs npm | All versions | 1.0.2 |
@berslucas/liljs npm | All versions | 1.0.2 |
How do I fix GHSA-c53x-wwx2-pg96?
Upgrade @berslucas/liljs to 1.0.2 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-c53x-wwx2-pg96 being exploited?
There is no known exploitation of GHSA-c53x-wwx2-pg96 in the wild and no public exploit code.