{"id":"GHSA-5vj8-3v2h-h38v","aliases":[],"status":"published","title":"Remote Code Execution in next","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.\n\n## Recommendation\n\nUpgrade to version 5.1.0.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2020-09-04T18:04:08Z","modified":"2023-01-09T05:04:26Z","fixes":[{"ecosystem":"npm","package":"next","fixed_in":["5.1.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"next","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.9.9"},{"fixed":"5.1.0"}]}]},{"source":"osv","ecosystem":"npm","package":"next","ranges":[{"type":"SEMVER","events":[{"introduced":"0.9.9"},{"fixed":"5.1.0"}]}]}],"references":[{"url":"https://www.npmjs.com/advisories/1538","tags":["web"]},{"url":"https://github.com/advisories/GHSA-5vj8-3v2h-h38v"},{"url":"https://github.com/vercel/next.js","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-5vj8-3v2h-h38v","title":"Remote Code Execution in next","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.\n\n## Recommendation\n\nUpgrade to version 5.1.0.","status":"published","published":"2020-09-04T18:04:08Z","modified":"2023-01-09T05:04:26Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:36:10.502376Z"}],"osv":[{"id":"GHSA-5vj8-3v2h-h38v","title":"Remote Code Execution in next","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.\n\n## Recommendation\n\nUpgrade to version 5.1.0.","status":"published","published":"2020-09-04T18:04:08Z","modified":"2022-04-28T19:57:43Z","cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:38.911014Z"}]}}
