Skip to content

Reverse Proxy Misconfigurations · passage 7 of 9

Off By Slash

2 code blocks · Reverse Proxy Misconfigurations/README.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

Nginx matches incoming request URIs against the location blocks defined in your configuration. * `location /app/` matches requests to `/app/`, `/app/foo`, `/app/bar/123`, etc. * `location /app` (no trailing slash) matches `/app*` (i.e., `/application`, `/appfile`, etc.), This means in Nginx, the presence or absence of a slash in a location block changes the matching logic.

server {
  location /app/ {
    # Handles /app/ and anything below, e.g., /app/foo
  }
  location /app {
    # Handles only /app with nothing after OR routes like /application, /appzzz
  }
}

Example of a vulnerable configuration: An attacker requesting `/styles../secret.txt` resolves to `/path/styles/../secret.txt`

location /styles {
  alias /path/css/;
}

Source: Reverse Proxy Misconfigurations/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Data as of 2026-11-15. CVE List through 2026-11-15 · EPSS of 2026-11-14 · CISA KEV checked 2026-11-15. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.