Path traversal in Next.js - #VU6872

 

Path traversal in Next.js - #VU6872

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


Vulnerability identifier: #VU6872
CSH Severity: Medium
CVSS v4.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
Vendor: vercel
Affected software:
Next.js

Detailed vulnerability 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

Sources