CVE-2020-5284
JavaScript vulnerability analysis and mitigation

Overview

Next.js versions before 9.3.2 contained a directory traversal vulnerability (CVE-2020-5284) discovered in early 2020. The vulnerability allowed attackers to craft special requests to access files in the dist directory (.next). This vulnerability was limited to the dist directory and did not affect files outside of it. The dist directory typically only contains build assets unless applications intentionally store other assets there (GitHub Release).

Technical details

The vulnerability was discovered through a security audit by Doyensec. Attackers could use directory traversal techniques to access files within the .next directory through specially crafted requests. The vulnerability affected deployments using next start command. A proof of concept for the vulnerability was demonstrated using the path HTTP://localhost/_next/static/../server/pages-manifest.json (AttackerKB).

Impact

The impact was limited to exposing files within the .next (dist) directory. Deployments on ZEIT Now v2, deployments using the serverless target, and deployments using next export were not affected. Only users of Next.js below version 9.3.2 that used next start were vulnerable (GitHub Release).

Mitigation and workarounds

The primary mitigation is upgrading to Next.js version 9.3.2 or later. The patch ensures that only known filesystem paths of .next/static are made available under /_next/static. The development team added regression tests for this attack to their security integration test suite. For potentially affected systems, administrators can filter logs for '../' patterns with 200 response codes to assess impact (GitHub Release).

Community reactions

The vulnerability was responsibly disclosed by Luca Carettoni from Doyensec. Next.js development team established a security mailing list for future security-related communications and encouraged responsible disclosure of future issues through their security email (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59041HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-58764HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-59049HIGH7.5
  • JavaScriptJavaScript
  • @mockoon/commons-server
NoYesSep 10, 2025
CVE-2025-59052HIGH7.1
  • JavaScriptJavaScript
  • @nguniversal/common
NoYesSep 10, 2025
CVE-2025-57520LOW2.1
  • JavaScriptJavaScript
  • decap-cms
NoNoSep 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management