Description
Next.js versions before 9.3.2 have a directory traversal vulnerability. Attackers could craft special requests to access files in the dist directory (.next). This does not affect files outside of the dist directory (.next). In general, the dist directory only holds build assets unless your application intentionally stores other assets under this directory. This issue is fixed in version 9.3.2.
Remediation
References
https://github.com/zeit/next.js/releases/tag/v9.3.2
https://github.com/zeit/next.js/security/advisories/GHSA-fq77-7p7r-83rj
Related Vulnerabilities
CVE-2020-7606 Vulnerability in npm package docker-compose-remote-api
CVE-2017-16137 Vulnerability in maven package org.webjars.npm:debug
CVE-2019-10247 Vulnerability in maven package org.eclipse.jetty:jetty-server
CVE-2019-20343 Vulnerability in maven package org.codehaus.mojo:exec-maven-plugin
CVE-2022-31018 Vulnerability in maven package com.typesafe.play:play_2.13