Security: Public /_next/static JS chunks expose sensitive build metadata and debug strings #2439

Open
opened 2025-11-20 07:09:50 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @tkloda on GitHub (Nov 4, 2025).

Describe the problem

Multiple client-side JavaScript (JS) chunks served from the /_next/static directory are publicly accessible and contain sensitive information. This includes specific build metadata, internal library version strings, and verbose runtime/debug error messages.

This information leakage allows for trivial reconnaissance and fingerprinting of the application stack, which can aid an attacker in identifying the exact technologies in use.

Because these bundles are available without authentication, an attacker can download and analyze them to:

  1. Fingerprint the stack: Identify the exact framework (Next.js) and libraries (React) in use.
    
  2. Identify specific builds: Pinpoint exact build versions, which can be cross-referenced with public vulnerability databases (CVEs). 
    
  3. Discover misconfigurations: Runtime errors and debug messages can reveal information about the application's state or dependencies.
    

This information significantly lowers the bar for attackers to craft targeted exploits against known vulnerabilities in the specific versions identified.

To Reproduce

  1. Access https://netbird-instance/index.html in a browser and "View Page Source," or use an intercepting proxy (like Burp Suite) to inspect the response for a GET /index HTTP/2 request.

  2. Locate the static assets, specifically the JavaScript chunks. For example:

<script src="/_next/static/chunks/abcde-aaa333bbb111.js" defer=""></script>
  1. Access the URL for any of these chunks directly (e.g., https://netbird-instance/_next/static/chunks/abcde-aaa333bbb111.js) and download the file.

  2. Inspect the contents of the downloaded JS file.

Expected behavior

Production JavaScript bundles served to the public should be minified and stripped of all sensitive metadata. This includes:

  • Exact library build/version identifiers.
    
  • Verbose runtime errors and debug messages.
    

Are you using NetBird Cloud?
NetBird self-hosted

NetBird version

0.59.11

Originally created by @tkloda on GitHub (Nov 4, 2025). **Describe the problem** Multiple client-side JavaScript (JS) chunks served from the /_next/static directory are publicly accessible and contain sensitive information. This includes specific build metadata, internal library version strings, and verbose runtime/debug error messages. This information leakage allows for trivial reconnaissance and fingerprinting of the application stack, which can aid an attacker in identifying the exact technologies in use. Because these bundles are available without authentication, an attacker can download and analyze them to: 1. Fingerprint the stack: Identify the exact framework (Next.js) and libraries (React) in use. 2. Identify specific builds: Pinpoint exact build versions, which can be cross-referenced with public vulnerability databases (CVEs). 3. Discover misconfigurations: Runtime errors and debug messages can reveal information about the application's state or dependencies. This information significantly lowers the bar for attackers to craft targeted exploits against known vulnerabilities in the specific versions identified. **To Reproduce** 1) Access https://netbird-instance/index.html in a browser and "View Page Source," or use an intercepting proxy (like Burp Suite) to inspect the response for a GET /index HTTP/2 request. 2) Locate the static assets, specifically the JavaScript chunks. For example: <script src="/_next/static/chunks/abcde-aaa333bbb111.js" defer=""></script> 3) Access the URL for any of these chunks directly (e.g., https://netbird-instance/_next/static/chunks/abcde-aaa333bbb111.js) and download the file. 4) Inspect the contents of the downloaded JS file. **Expected behavior** Production JavaScript bundles served to the public should be minified and stripped of all sensitive metadata. This includes: - Exact library build/version identifiers. - Verbose runtime errors and debug messages. **Are you using NetBird Cloud?** NetBird self-hosted **NetBird version** 0.59.11
saavagebueno added the triage-needed label 2025-11-20 07:09:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2439