# GHSA-5vj8-3v2h-h38v: Remote Code Execution in next

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-04T18:04:08.000Z
- Modified: 2022-04-28T19:57:43.000Z
- Weaknesses: CWE-20

## Description

Versions of `next` prior to 5.1.0 are vulnerable to Remote Code Execution. The `/path:` route fails to properly sanitize input and passes it to a `require()` call. This allows attackers to execute JavaScript code on the server. Note that prior version 0.9.9 package `next` npm package hosted a different utility (0.4.1 being the latest version of that codebase), and this advisory does not apply to those versions.

## Recommendation

Upgrade to version 5.1.0.

(As written by GitHub Advisory Database.)

## Affected

- next (npm): from 0.9.9 before 5.1.0

## References

- <https://github.com/vercel/next.js> (package)
- <https://www.npmjs.com/advisories/1538> (web)

## Sources

- GitHub Advisory Database: [GHSA-5vj8-3v2h-h38v](https://github.com/advisories/GHSA-5vj8-3v2h-h38v), CC-BY-4.0, modified 2022-04-28

---

Page: https://cve.day/GHSA-5vj8-3v2h-h38v · Whole record: https://cve.day/GHSA-5vj8-3v2h-h38v.json · Rebuilt by cve.day 2026-11-25T22:56:44.245Z
