Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
© 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 · v1.0.0+2026-08-14.82f92cb · 82f92cb
← Back to overview
Security article

URL-based access control can be circumvented

URL-based access control can be circumvented: This lab uses a front-end system to block access to /admin, but the back-end supports the X-Original-URL header. To solve the lab, use this header to bypass restrictions and delete the user carlos. • PortSwigger • Access control vulnerabilities • X-Original-URL

2023-05-111 tag
Tags

Bypassing Front-End Restrictions with X-Original-URL


🎯 Objective

This lab uses a front-end system to block access to /admin, but the back-end supports the X-Original-URL header.
To solve the lab, use this header to bypass restrictions and delete the user carlos.


🧭 Strategy

  • The front-end restricts direct access to /admin.
  • Back-end routing via the X-Original-URL header may bypass it.
  • Inject this header to reroute requests server-side while preserving front-end restrictions.

🔎 Analysis

1. 🧪 Test Header Injection

First, test with a dummy path to confirm if the back-end accepts header overrides:

http
X-Original-URL: /doesnotexist/

This checks if the back-end is influenced by the injected path.

Test Injection


2. 🛠️ Access the Admin Panel

Update the header with the real endpoint:

http
X-Original-URL: /admin

This bypasses the front-end restrictions and reveals the admin panel.

Admin Panel


3. ⚠️ Handling Parameters

Since X-Original-URL doesn’t support query parameters directly, pass them in the main request path:

http
GET /?username=carlos HTTP/2
X-Original-URL: /admin/delete

This routes the request to /admin/delete while supplying username=carlos via query parameters.

Delete Carlos


4. ✅ Carlos Deleted

Final crafted request successfully deletes the user carlos.

Success


📝 Action Plan

  1. Log in and intercept a request.
  2. Add the header:
    http
    X-Original-URL: /admin
  3. Confirm access to the admin panel.
  4. Craft the final request:
    http
    GET /?username=carlos
    X-Original-URL: /admin/delete
  5. Send the request and verify carlos is deleted.
Navigate

In this post

  1. 01Bypassing Front-End Restrictions with X-Original-URL
  2. 02🎯 Objective
  3. 03🧭 Strategy
  4. 04🔎 Analysis
  5. 051. 🧪 Test Header Injection
  6. 062. 🛠️ Access the Admin Panel
  7. 073. ⚠️ Handling Parameters
  8. 084. ✅ Carlos Deleted
  9. 09📝 Action Plan
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.