CVE-2018-18282 Next.js has cross site scripting (XSS) vulnerability via the 404 or 500 /_error page
Attackers can execute arbitrary scripts in victim browsers via the Next.js error pages, potentially leading to session hijacking or data theft.
- 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 CVE-2018-18282?
CVE-2018-18282 is a medium-severity cross-site scripting vulnerability in n/a, published on 12 Oct 2018. 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
Next.js 7.0.0 and 7.0.1 has XSS via the 404 or 500 /_error page.
Weakness: CWE-79
Which versions are affected by CVE-2018-18282?
2 open source packages ship an affected version, including next. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
next npm | From 7.0.0 | 7.0.2 |
next npm | From 7.0.0 | 7.0.2 |
Products include Zeit Next.js.
How do I fix CVE-2018-18282?
Upgrade next to 7.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 CVE-2018-18282 being exploited?
There is no known exploitation of CVE-2018-18282 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-qw96-mm2g-c8m7.