MediumThe Uppercase Escape: Breaking Endpoint Restrictions via Case-Sensitivity | by Muthu | InfoSec Write-ups
Sitemap
InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

The Uppercase Escape: Breaking Endpoint Restrictions via Case-Sensitivity

3 min readJun 24, 2025

--

Press enter or click to view image in full size

While performing a standard API assessment on example.com, I stumbled upon a classic yet overlooked trick that turned a restricted API into an open door — just by changing lowercase to uppercase letters.

Sounds simple? Maybe.
But this small discovery could have serious consequences if left unchecked — especially in systems relying on strict endpoint access control.

The Vulnerability — Garbage Collection’s Forgotten Gate

The target endpoint:

https://example.com/api/metrics

…is supposed to be forbidden (HTTP 403) for unauthorized access — likely restricted to internal monitoring or administrative garbage collection processes.

Press enter or click to view image in full size

But what if you simply asked for:

https://example.com/api/METRICS

And the server happily replied with HTTP 200 OK, revealing potentially sensitive operational metrics?

Press enter or click to view image in full size

Why This Happened: The Root Cause

Most modern web servers (e.g., NGINX, Apache) or frameworks (like Spring, Express) normalize paths by default — treating /api/metrics and /api/METRICS as equivalent.

But if the backend (or a reverse proxy in front of it) forgets to enforce strict case sensitivity, the protection breaks.

Possible reasons:

  1. Case-insensitive routing at the backend layer.
  2. Misconfigured authorization middleware only protects lowercase paths (/metrics) — letting upper or mixed-case slip through unvalidated.
  3. Lack of global normalization in the garbage collection route handler.

Potential Impact

✔️ Unauthorized access to the metrics endpoint, likely intended only for internal monitoring or garbage collection.

Get Muthu’s stories in your inbox

Join Medium for free to get updates from this writer.

✔️ Exposure of:

  • System performance data
  • Application uptime
  • Internal IPs or service info
  • Possibly debug or error information

✔️ Attack surface expansion — if similar endpoints (/health, /admin, /debug) behave the same way.

✔️ Could assist attackers in reconnaissance for lateral movement or DoS attacks.

Why This Bug Is Not “Simple”

Most pen-testers stop at /metrics when they hit a 403 — assuming it's blocked.

But:

✔️ Rarely does anyone test uppercase or mixed-case bypasses.
✔️ Garbage collection or metrics endpoints are often overlooked as low risk — making this a valuable find.
✔️ Shows a deeper logic failure in request validation, not just a missing auth header.

Lessons for Bug Hunters

✔️ Always fuzz URL casing — especially for internal, monitoring, or debug endpoints.
✔️ Time-based differences (like the garbage collector) are good candidates for deeper bypass attempts.
✔️ Think like a misconfigured proxy — would it mistake /metrics for /METRICS?

Final Thoughts

This wasn’t your usual boring 403 block — this was a crack in the system caused by simple human assumption:

“No one would try that in uppercase.”

And yet here we are.

Hackers? We try everything.
Even CAPS LOCK.

--

Muthu
Muthu

Written by Muthu

Full-stack developer & web pentester. I find bugs, build secure systems, and hunt vulnerabilities before the bad guys do. Security is my second language.

InfoSec Write-ups
InfoSec Write-ups

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/