Urgent.News

What's breaking now, across thousands of outlets.

Tech

The 403 Bypass Playbook: Path Normalization and Reverse-Proxy Discrepancies

A 403 is rarely the end of the story. Here's the playbook senior testers run when an endpoint says Forbidden. You find a juicy endpoint during recon: GET /admin/dashboard ➔ 403 Forbidden Most people close the tab and move on. Senior testers treat a 403 as an invitation to test parser discrepancy — because modern apps aren't one monolith. They sit behind edge gateways, WAFs and reverse proxies…

When a web application returns a 403 Forbidden response, it's not an automatic end to the investigation. Senior penetration testers view a 403 as an opportunity to explore parser differences and reverse-proxy discrepancies. Modern applications often have multiple layers, including edge gateways, web application firewalls (WAFs), and reverse proxies like Cloudflare, Nginx, HAProxy, and Envoy, which route traffic to backend servers such as Node, Spring Boot, Flask, or Go.

The key to exploiting these discrepancies lies in understanding path normalization and reverse-proxy header overrides. Path normalization refers to how the proxy and backend parse the URL differently. For example, a request to GET /admin/..;/dashboard may be treated differently by Nginx and a Tomcat/Spring backend. Nginx may not match the /admin ACL block, while the backend would strip the /..;/ and respond with the protected controller.

Reverse-proxy header overrides also play a significant role. Many internal systems rely on legacy routing headers, such as X-Original-URL or X-Forwarded-Prefix, to determine the actual request path. The WAF might see a harmless request, while the backend reads the original header and applies the appropriate routing, leading to unauthorized access.

Other techniques include verb tampering and method overriding, where access control is tied to specific HTTP methods like GET, POST, or HEAD. Case and extension tricks can also be leveraged to bypass authentication, such as trying GET /Admin/Dashboard, GET /admin/dashboard.json, or GET /admin/dashboard/ with a custom query parameter.

To mitigate these issues, it's crucial to normalize the path before inspection. Canonicalize and decode the URL to ensure consistent parsing. Strip any client-supplied routing headers at the edge so they cannot be manipulated to inject unauthorized paths. Finally, adopt a zero-trust approach at the backend, validating identity and role for every request instead of relying solely on the edge gateway.

By understanding and exploiting these vulnerabilities, testers can uncover critical vulnerabilities that might otherwise go unnoticed.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Reasons to learn cybersecurity?

I got into it kind of by accident through compliance work, and here’s what kept me there. There’s a lot of work. Every company, even small ones, needs someone who gets security now, and there just…

OpenPipeline routing: create a custom pipeline and route logs to it

All your logs take the same path, and the same processing rule applies to the payment service and to a test job. This tutorial shows OpenPipeline routing in practice: create a custom pipeline for one…

  • Identify unique attributes in logs for routing, such as deployment name and Kubernetes namespace.
  • Create a custom pipeline in Dynatrace SaaS OpenPipeline with processors and matching conditions.

More from Tuesday 10 November →