nextjs-cache-poisoning

Official

Exploit Next.js stale caches for security testing

Authordreadnode
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of identifying and validating internal cache poisoning vulnerabilities in Next.js applications that arise from misconfigured stale cache settings and insufficient header validation, which can allow attackers to inject malicious content served to multiple users via shared caches.

Core Features & Use Cases

  • Vulnerability Detection: Identifies viable Next.js cache poisoning targets by checking for x-nextjs-cache headers and s-maxage/stale-while-revalidate cache directives.
  • Exploitation Execution: Injects test content via x-now-route-matches header manipulation to poison both SSR page responses and JSON data endpoints under /_next/data/.
  • Impact Validation: Confirms cross-user cache impact by verifying poisoned content is served to other users, not just the attacker's session, and provides steps to maintain poisoned entries during the stale-while-revalidate window.
  • Use Case: Red teamers assessing Next.js applications can use this Skill to test whether misconfigured shared cache settings allow persistent, cross-user content injection without direct application vulnerabilities.

Quick Start

Use the nextjs-cache-poisoning skill to test a target Next.js application for cache poisoning vulnerabilities by identifying routes with viable cache settings, injecting test content via header manipulation, and confirming the poisoned response is served to other users.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nextjs-cache-poisoning
Download link: https://github.com/dreadnode/capabilities/archive/main.zip#nextjs-cache-poisoning

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.