.. / CVE-2020-5284

Exploit for Next.js <9.3.2 - Local File Inclusion (CVE-2020-5284)

Description:

Next.js versions before 9.3.2 are vulnerable to local file inclusion. An attacker can 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.

Nuclei Template

View the template here CVE-2020-5284.yaml

Validate with Nuclei

echo "$URL" | nuclei -t ~/nuclei-templates/http/cves/2020/CVE-2020-5284.yaml
Copy

References:

https://github.com/zeit/next.js/releases/tag/v9.3.2
https://github.com/merlinepedra/nuclei-templates
https://github.com/Z0fhack/Goby_POC
https://github.com/zeit/next.js/security/advisories/GHSA-fq77-7p7r-83rj
https://nvd.nist.gov/vuln/detail/CVE-2020-5284