Skip to main content
InfoInfo disclosureOWASP A05:2021CWE-200

How to fix: Next.js App Router RSC headers exposed

React Server Component (RSC) response headers from Next.js App Router are present, confirming the application is built with Next.js.

Why it matters

Identifying the framework as Next.js App Router enables targeted reconnaissance. Attackers can focus on Next.js-specific vulnerabilities, known misconfigurations (e.g., server action exposure, ISR cache poisoning), and common patterns.

Next.js sets RSC-specific headers like x-nextjs-cache and vary: RSC. While these serve a legitimate performance purpose, they also fingerprint the framework.

How to fix it

  1. 1This is low-risk: focus on Next.js-specific security hardening rather than hiding the framework
  2. 2Ensure poweredByHeader: false in next.config.mjs
  3. 3Review server actions for proper authentication
  4. 4Enable HSTS and CSP headers

Code examples

next.config.mjs: remove version signals

JavaScript
export default {
  poweredByHeader: false,
  headers: async () => [
    { source: "/(.*)", headers: [
      { key: "X-Frame-Options", value: "DENY" },
      { key: "X-Content-Type-Options", value: "nosniff" },
    ]}
  ]
};

References

Detected automatically by VulnRadar. The check id is nextjs-app-router-rsc-headers, stable across every scan so you can filter or diff on it.

See every info disclosure check

Questions

How severe is Next.js App Router RSC headers exposed?
VulnRadar rates this info severity in the info disclosure category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id nextjs-app-router-rsc-headers, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Next.js App Router RSC headers exposed map to?
It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for next.js app router rsc headers exposed

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Next.js App Router RSC headers exposed fix | VulnRadar