#VU6872 Path traversal in Next.js

 

#VU6872 Path traversal in Next.js

Published: June 2, 2017 / Updated: September 1, 2021


Vulnerability identifier: #VU6872
Vulnerability risk: Medium
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/U:Green
CVE-ID: N/A
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vulnerable software:
Next.js
Software vendor:
vercel

Description

The vulnerability allows a remote attacker to view contest of arbitrary files on the system.

The vulnerability exists due to insufficient input validation when processing requests sent to /_next</code> and <code>/static namespaces. A remote attacker can send a specially crafted HTTP GET request, containing directory traversal sequences and view contest of arbitrary files on the system.

Exploitation example:

http://[host]/_next\..\..\..\..\..\..\..\..\..\etc\passwd

Remediation

Update to version 2.4.1

External links