Skip to content
RCE Write-up Intermediate

CVE-2025-55182: A Pre-Authentication Remote Code Execution in Next.js - Complete Guide

Next.js Server Actions deserialise a special form-data field without proper validation, so a crafted request can make the server run attacker-controlled code. An attacker who finds a Server Action endpoint could achieve remote code execution.

osintteam.blog

Published on osintteam.blog

When CVE-2025–55182 dropped, it immediately became one of the most impactful Remote Code Execution (RCE) vulnerabilities in the JavaScript ecosystem. The issue affected Next.js 13+, specifically a feature called Server Actions, which quietly introduced a dangerous deserialization bug.

PARADOX, on osintteam.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the React Server Components deserialiser accepts serialised objects that name server-side functions and executes them without validating the input.

Impact

A crafted request could make the server run attacker-chosen commands, giving remote code execution.

What the attacker needed

Target runs a vulnerable Next.js 13+ version; a reachable Server Action endpoint; ability to send a crafted POST request

The fix

The vulnerable deserialisation code was fixed by updating Next.js to a patched version.

How it was found

  1. Open developer tools and filter the network tab to POST requests only.
  2. Open each POST request and check whether it has a Next-Action header.
  3. Check that the request uses multipart/form-data content type.
  4. Look for a field named 0 whose value starts with the action marker.
  5. Replace the field value with malformed data and look for a 500 error or decode error.
  6. Replace the field with a payload that names a server-side function and a command to run.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Next.js is a tool for building websites. Its Server Actions feature lets the browser send a special request that the server turns back into data. The server did not check that data carefully, so a malicious request could make it run commands chosen by the attacker.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.