{"id":"GHSA-5vj8-3v2h-h38v","aliases":["GHSA-5vj8-3v2h-h38v"],"related":[],"kind":"vulnerability","state":"published","title":"Remote Code Execution in next","summary":"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.\n\n## Recommendation\n\nUpgrade to version 5.1.0.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.\n\n## Recommendation\n\nUpgrade to version 5.1.0.","format":"markdown","source":"ghsa"}],"published":"2020-09-04T18:04:08.000Z","modified":"2022-04-28T19:57:43.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"type":"semver","introduced":"0.9.9","status":"affected","fixed":"5.1.0"}],"ecosystem":"npm","package":"next","purl":"pkg:npm/next","source":"ghsa"}],"references":[{"url":"https://github.com/vercel/next.js","tags":["package"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/1538","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5vj8-3v2h-h38v","url":"https://github.com/advisories/GHSA-5vj8-3v2h-h38v","licence":"CC-BY-4.0","modified":"2022-04-28T19:57:43.000Z"}],"updatedAt":"2026-11-25T22:56:44.245Z"}