Skip to content
Access control Write-up Beginner

Admin Privileges Escalation Via Exploiting Cve 2025 29927

A Next.js site was vulnerable to CVE-2025-29927, where a crafted middleware subrequest header bypasses middleware-based authorisation checks. By sending that header to admin paths, the author reached the admin panel without logging in and could add new users.

Al Baradi Joy Follow

Published on systemweakness.com

‎Hello Friend, I am Al Baradi Joy.Iam Not Regular on Hack Activists.But Maybe I will Be Regular from 2026-2027.For That Reason I hunt 2-4 Days on Every Month for Remember the Skill.For That Reason I usually Pick Any Domain For Test from Hackerone.I Don’t gather subdomins.Then,Start Everything.I Don’t Hunt Not like…

Al Baradi Joy, on systemweakness.com

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 Next.js middleware trusted an internal header used for subrequests, letting an external request spoof it and skip the authorisation logic.

Impact

An unauthenticated attacker could reach the admin panel and add new users, though the report was closed as a duplicate.

What the attacker needed

A Next.js site running a vulnerable version; no account needed

The fix

Upgrading Next.js to a patched version removes the header-based middleware bypass.

How it was found

  1. Find a Next.js site with a sign-up button and note its version
  2. Add a custom middleware subrequest header to requests
  3. Request common admin paths such as /admin and check status codes
  4. Confirm /admin returns 200 and load it in the browser with the header modified
  5. Reach the admin panel and add a new user

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 framework for building websites, and 'middleware' is code that runs before a page is shown, often used to check whether you are allowed in. A known flaw meant a special request header could make the site skip those checks, so protected admin pages loaded for anyone who sent it.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.