Skip to content
Misconfiguration Write-up Intermediate

Bypassing an AWS WAF Challenge Through URL-Encoding: An Edge-versus-Origin Normalization Mismatch

The AWS WAF challenge on authentication endpoints could be bypassed by percent-encoding a single character in the path, causing the edge to miss its literal-path rule while the origin decoded the path and routed to the real handler. An attacker could reach login, registration, and password-recovery logic without triggering the anti-automation challenge.

redhunter01 Follow

Published on medium.com

Cybersecurity

redhunter01, on medium.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

Context

During a security assessment of a production authentication API, the researcher found a mismatch between how the AWS WAF at the CDN edge evaluated request paths and how the backend routed them. The authentication endpoints (login, registration and password recovery) were protected by an AWS WAF challenge action at the edge. Requests to the ordinary paths received a challenge response before reaching the application. The protection depended on matching the literal request path, and by percent-encoding a single character in the path the edge no longer applied the challenge, while the origin decoded the path and routed the request to the same authentication handler.

The application used a layered request-processing architecture:

  1. CDN and WAF: evaluated incoming requests and applied an anti-automation challenge.
  2. Load balancer or proxy: forwarded requests toward the application.
  3. Authentication API: processed login, registration and password-recovery operations.

The intended security boundary was:

Text
Incoming authentication request
              |
              v
         CDN / AWS WAF
              |
              v
      Challenge enforcement
              |
              v
      Backend authentication API

When the WAF challenge fired, the request was stopped at the edge and the backend did not receive the authentication request. The problem was that the edge and the origin did not interpret every representation of the same path identically.

Setup

The assessment was carried out against a production authentication API. The report does not describe any accounts, roles, tooling or versions beyond the architecture above. The only precondition that matters is that the authentication endpoints were protected by an AWS WAF challenge action at the CDN edge, and that the challenge was applied based on the literal request path.

Finding it

HTTP requests can represent a path using percent-encoded characters. For example, %6c represents the lowercase letter l, %66 represents f, and %72 represents r. A URL-encoded path can therefore represent the same logical endpoint as its ordinary spelling. The pairs relevant to this investigation were:

Canonical path Encoded representation
/api/v1/login /api/v1/%6cogin
/api/v1/register /api/v1/%72egister
/api/v1/forgotPassword /api/v1/%66orgotPassword

The security issue was not percent-encoding itself. It was that the WAF evaluated the incoming path in a form that did not match the protected literal path, while the origin subsequently decoded the encoded character and routed the request to the real authentication handler. The WAF effectively saw a different path representation from the one ultimately processed by the backend.

Exploitation

Step 1: Establish a baseline

Before investigating the encoded paths, the researcher established the behaviour of the ordinary authentication routes. A request to the canonical login endpoint produced a response with these characteristics:

HTTP
HTTP/2 202
server: CloudFront
x-amzn-waf-action: challenge
content-length: 0

The response had an empty body and included the WAF challenge indicator. This established the intended control behaviour: the request was being challenged at the edge rather than processed normally by the authentication application. The same general challenge behaviour was observed for the canonical registration and password-recovery paths.

Step 2: Test the encoded path

The researcher then compared the response from the canonical login path with the response from its percent-encoded equivalent. The encoded request used the same HTTP method, host, content type and controlled invalid credentials. The path was the relevant difference.

Instead of receiving the empty edge challenge response, the encoded request returned a response resembling:

HTTP
HTTP/2 200
server: awselb/2.0
content-type: application/json

The response body contained an application-level authentication error:

JSON
{
  "error": true,
  "errorCode": "InvalidCredential",
  "errors": [
    {
      "code": 4318
    }
  ],
  "data": {
    "sessionAttemptId": "..."
  }
}

The identifiers and session-related values above are illustrative and have been omitted or generalized.

This response was materially different from the baseline. The canonical request received an edge challenge, while the encoded request reached the real login handler and returned its normal application-level response. The evidence supporting this conclusion included:

  • The absence of the WAF challenge indicator on the encoded request.
  • A different server-response signature consistent with the origin path.
  • A structured authentication error returned by the actual application handler.
  • The same distinction reproduced across other authentication routes.

The important finding was not simply that the encoded URL returned HTTP 200. An HTTP status code alone does not establish a security bypass. The stronger evidence was that the response changed from an edge-generated challenge to the expected behaviour of the backend authentication handler.

Step 3: Reproduce across authentication endpoints

The same normalization mismatch was observed on three authentication routes.

Functionality Encoded character Observed behaviour
Login l → %6c Reached the login handler
Registration r → %72 Reached registration validation
Password recovery f → %66 Reached the password-recovery handler

The ordinary forms of these paths continued to receive the WAF challenge. The encoded forms reached the corresponding application handlers.

For registration, the application returned a field-validation error. This showed that the request had progressed into application-level processing rather than being stopped by the edge challenge. For password recovery, the handler returned its normal success-shaped response. That response established handler reachability, but it did not independently prove that an email was delivered or that a password was changed.

These distinctions matter when assessing impact. The evidence established that the edge challenge could be bypassed to reach the authentication handlers. It did not establish successful account compromise or successful password recovery against a real user.

Step 4: Measure the remaining rate limit

After confirming the challenge bypass, the researcher examined whether application-level rate limiting compensated for the missing edge control. In a controlled burst test, 30 requests were sent to the encoded login path. The reported results were:

Measurement Observed result
Total requests 30
Requests that reached the handler 22
Handler-reaching rate 73.3%
Requests not counted as reaching the handler 8

Some responses included an application-level rate-limit error, identified by code 4331. However, rate-limit responses appeared intermittently rather than consistently blocking the burst. The encoded path also continued to avoid the edge challenge. These results indicated that the application-level rate limiter did not fully replace the bypassed edge control under the tested conditions.

There are important limits to this measurement. A single 30-request burst does not establish the application's behaviour under every traffic pattern, account configuration, source address or time window, nor does it establish a sustainable attack rate. It does, however, provide evidence that the remaining rate limit was not an effective substitute for the challenge during this specific test.

Root cause

The underlying failure involved inconsistent interpretation of the request path. The observed processing sequence was:

Text
Client sends percent-encoded path
              |
              v
CDN / WAF evaluates literal path
              |
              v
Expected path rule does not match
              |
              v
Request passes without the challenge
              |
              v
Origin decodes the encoded character
              |
              v
Decoded path matches an authentication route
              |
              v
Real application handler processes request

The edge applied its security decision before the request representation had been normalised consistently with the origin's routing behaviour. The WAF and the backend therefore disagreed about the effective request path. This is an example of a parser or normalization differential: different components may interpret the same input differently because they apply transformations at different stages. When security rules depend on one representation and application routing depends on another, an attacker may be able to reach functionality that the edge was intended to protect.

A path-normalization difference is not automatically a vulnerability. It becomes a security issue when the difference defeats an intended security control. In this case, the edge challenge was specifically intended to restrict automated access to authentication entry points. The canonical requests were challenged, while encoded requests reached the backend without that challenge. That established a direct relationship between the normalization mismatch and the security-control bypass. The finding was therefore not based solely on unusual URL parsing; it was based on a demonstrated difference in enforcement.

The critical question was whether the alternative path representation reached a handler that the normal representation could not reach without passing the challenge. The observed responses supported the conclusion that it did.

Impact

The primary impact was the removal of an intended anti-automation barrier from production authentication endpoints. Because the encoded paths reached the actual handlers, automated clients could interact with the login, registration and password-recovery logic without triggering the configured challenge.

Credential stuffing and password spraying. The bypass could reduce the effectiveness of an edge challenge intended to discourage or interrupt automated login attempts. Depending on the application's remaining controls, this could increase exposure to credential stuffing or password spraying. The test demonstrated handler reachability and inconsistent rate-limit responses. It did not demonstrate a successful login using another user's credentials.

Automated registration attempts. The registration handler could be reached without the intended edge challenge. This could facilitate automated registration attempts if additional application-level protections are insufficient. The test established handler reachability, not successful abuse of real registrations at scale.

Password-recovery abuse. The password-recovery handler could also be reached without the edge challenge. This could facilitate repeated password-recovery requests, depending on the application's additional controls. The observed response did not prove that messages were sent or that any user's account was compromised.

Security-control inconsistency. The broader concern is that a protection configured at the edge did not reliably cover the backend functionality it was meant to protect. Any security assessment that considers only the canonical URL could therefore miss an alternative path representation that reaches the same handler.

What was confirmed:

  • Canonical authentication paths received a WAF challenge.
  • Percent-encoded path variants avoided that challenge.
  • The encoded variants reached the real login, registration and password-recovery handlers.
  • The behaviour was observed across all three authentication routes.
  • The tested burst reached the login handler for 22 of 30 requests.
  • Application-level rate-limit errors appeared intermittently.
  • The edge challenge was not consistently reapplied to the encoded paths.

What was not established by these tests:

  • Successful account takeover.
  • Successful credential stuffing against real accounts.
  • Successful password spraying.
  • Confirmed delivery of password-recovery messages.
  • A particular sustainable request rate under prolonged load.
  • Complete absence of all other anti-abuse controls.

The demonstrated vulnerability was the bypass of the edge challenge. Downstream account abuse was a realistic risk, not a confirmed outcome of the supplied proof of concept.

Fix

The core fix is to make the security decision consistent with the application's eventual route interpretation. The report recommends the following.

  1. Normalise paths before applying path-based security rules. The edge should evaluate a canonical representation of the request path, using well-defined normalization behaviour consistent with the origin. Equivalent path representations should not receive different protection merely because a character is percent-encoded. Normalization must be implemented carefully so that it does not introduce new routing ambiguities or alter legitimate application behaviour.
  2. Enforce protection at the route or handler level. Where possible, associate the anti-automation control with the actual authentication route rather than relying solely on a literal path match at the edge. An origin-level or application-level control can provide defence in depth if a request reaches the handler through an unexpected representation.
  3. Apply consistent rules across authentication endpoints. Login, registration and password recovery should have consistent anti-abuse protections. The fix should cover every supported version and route, not just the first endpoint discovered.
  4. Strengthen application-level rate limiting. Rate limiting should be independently enforced at the authentication layer. Appropriate controls may include account-based and source-based limits, progressive delays, monitoring and additional verification when abuse is detected. These controls should not depend exclusively on the WAF challenge being present.
  5. Test normalization behaviour during security validation. Regression tests should compare canonical and encoded path variants. They should verify that equivalent paths receive the same security treatment and that unexpected representations cannot bypass the challenge.
  6. Review other protected routes. If the same path-matching strategy is used elsewhere, other protected endpoints may share the same design weakness. The review should prioritise authentication and other sensitive operations, while confirming any additional findings individually.

Variants to test

The report closes with a repeatable methodology for finding edge-versus-origin discrepancies.

  1. Establish baseline behaviour. Send a normal request to the protected endpoint and record the status code, response headers, response body and any explicit WAF challenge indicators.
  2. Understand the intended security boundary. Determine whether the request is stopped at the edge or reaches the backend. Do not assume that an HTTP response proves which component handled the request.
  3. Examine path parsing and normalization. Investigate whether URL-encoded characters or other equivalent path representations are handled consistently across the request-processing chain. Only test systems and endpoints for which you have authorisation.
  4. Compare equivalent requests. Change the path representation while keeping the method, body, headers and other relevant variables constant. A controlled comparison makes it easier to isolate the factor responsible for the difference.
  5. Verify handler reachability. Look for evidence that the backend processed the request, such as application-specific validation errors or structured responses that differ from the edge challenge. Avoid treating a changed status code alone as conclusive proof.
  6. Check all relevant endpoints. A shared WAF rule may affect several routes, but each endpoint should be checked to establish the actual scope.
  7. Evaluate compensating controls. Determine whether application-level rate limits continue to operate and document the precise test conditions. Avoid extrapolating a small test burst into claims about unlimited throughput.
  8. Stop at the necessary proof. Demonstrating that an authentication handler can be reached without the intended challenge is sufficient to establish the control bypass. There is no need to attempt account takeover, attack real users or generate large volumes of authentication traffic to prove the underlying issue.

The complete chain was:

Text
Percent-encoded authentication path
                 |
                 v
Edge rule misses literal-path match
                 |
                 v
Challenge action is not applied
                 |
                 v
Origin decodes the path
                 |
                 v
Authentication handler is reached
                 |
                 v
Application-level rate limiting remains
                 |
                 v
Automated access is less constrained

The broader lesson is that security controls must operate on the same effective request semantics as the application they protect. When a WAF and an origin disagree about which endpoint a request represents, the gap between those interpretations can become a security boundary failure.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 24 min read.

What happened, in plain words

A company ran a website with a login page, a sign-up page and a "forgot my password" page. In front of that website sat a security guard: a service called a web application firewall, or WAF. Its job was to spot requests that looked automated (a script hammering the login page, for example) and stop them before they ever reached the real website. When the guard decided a request was suspicious, it did not let it through; it sent back a small "prove you are a human" challenge instead.

The researcher found that the guard and the website behind it read web addresses slightly differently. The guard compared the address it received against a list of protected addresses, character for character. The website behind it was more relaxed: it decoded certain encoded characters first and then looked at the address. So the researcher wrote the same address in a slightly disguised way, using a standard encoding trick that browsers and servers use every day. The guard did not recognise the disguised address as one of the protected ones, so it let the request through without a challenge. The website then decoded the address, recognised it as the login page, and processed the request normally.

That is the whole bug in one sentence: the guard checked one spelling of the address, the website acted on another spelling of the same address, and the gap between the two let automated traffic reach the login, sign-up and password-recovery code without the intended challenge.

The researcher was careful about what this does and does not prove. It proves the challenge could be skipped. It does not prove anyone's account was broken into, that password-recovery emails were actually sent, or that the site could be flooded without limit. The rest of this article walks through the same steps the researcher took, explaining each concept from scratch.

Some background you need first

Before the steps make sense, here are the pieces of the picture, explained as if you have never opened a developer tool in your life.

A request and a response. When you type an address into your browser and press Enter, your browser sends a request to a computer somewhere. That computer sends back a response: a status line, some headers (small labelled facts about the response) and usually a body (the actual content, such as a web page or a chunk of data). Every interaction on the web is this pair.

HTTP status codes. The first line of a response contains a three-digit number. 200 generally means "here is your content, all fine". 202 means "accepted, I have taken note of your request". 403 means "forbidden". 429 means "too many requests, slow down". You do not need to memorise them; just know that the number is the server's short answer about what it did.

Headers. Headers are lines like server: CloudFront or content-type: application/json. They are metadata: who answered, what kind of content is in the body, and so on. Security tools often leave telltale headers behind, and those headers are how you can tell which computer in a chain actually answered you.

An API. An API (application programming interface) is the part of a website that programs talk to, rather than people. When you fill in a login form in a browser, the page's JavaScript sends your username and password to an API address, and the API replies with data (for example, "wrong password"). Think of a restaurant: the dining room is the website you see, the kitchen is the API, and the waiter carries orders between them. The researcher was testing the kitchen directly.

An endpoint. An endpoint is one specific address on that API that does one specific job. /api/v1/login is the endpoint that handles logins; /api/v1/register handles sign-ups; /api/v1/forgotPassword handles password recovery. Each is like a different counter in the same building.

A CDN. A content delivery network is a worldwide network of servers that sit in front of a website to make it faster and to absorb attacks. Your request hits the nearest CDN server first, not the company's own machine. In this story the CDN was Amazon CloudFront.

A WAF and a challenge. A web application firewall inspects requests as they arrive and can block or challenge them according to rules. A challenge is the WAF's way of saying "I am not sure you are a real person; run this little test first". If you are a script that cannot or will not run the test, you are stuck. The challenge here was an AWS WAF challenge action, and the response carried the header x-amzn-waf-action: challenge to say so.

The origin. The origin is the company's actual server, the one that runs the real application code. The CDN and WAF sit in front of it. When people say "edge" they mean the front layer (CDN/WAF); when they say "origin" they mean the back layer (the real application).

A load balancer. A load balancer is a traffic cop that receives requests at the front and hands them to one of several back-end servers. The report lists a load balancer or proxy that forwarded requests toward the application. The response header server: awselb/2.0 was a different signature from the baseline.

Percent-encoding. Web addresses can only contain certain characters directly. Anything else, and sometimes even ordinary letters, can be written as a percent sign followed by two hexadecimal digits. %6c is the letter l, %66 is f, %72 is r. This is completely normal and legitimate: it is how addresses carry spaces (%20) or non-English characters. A browser will happily send either spelling, and a server will usually decode it back to the plain letter before doing anything.

Normalisation. Normalisation means "reduce different spellings of the same thing to one standard form". If two systems normalise the same input differently, or one normalises and the other does not, you get a parser differential: two components disagree about what the input means. That is the heart of this finding.

Rate limiting. A rate limit is a cap on how many requests you may make in a period. It is a second, independent defence: even if you get past the front door, the application itself may refuse to answer too many times in a row. The error code 4331 in this report is the application's way of saying "rate limit hit".

Credential stuffing and password spraying. Credential stuffing is trying username/password pairs stolen from one breach against another site, hoping people reuse passwords. Password spraying is trying one common password (like Password123) against many usernames. Both are automated attacks, which is exactly what a WAF challenge is meant to slow down.

With those pieces in place, here is the walkthrough.

1. The architecture: who sits where

The application used a layered request-processing architecture. In plain terms, a request passed through three stages:

  1. CDN and WAF: evaluated incoming requests and applied an anti-automation challenge.
  2. Load balancer or proxy: forwarded requests toward the application.
  3. Authentication API: processed login, registration and password-recovery operations.

The intended security boundary looked like this:

Text
Incoming authentication request
              |
              v
         CDN / AWS WAF
              |
              v
      Challenge enforcement
              |
              v
      Backend authentication API

Read the diagram top to bottom. A request arrives from the internet. It hits the CDN and WAF first. If the WAF decides a challenge is needed, the request stops right there and never goes further. Only requests that pass the challenge reach the backend authentication API, the code that actually checks passwords and creates accounts.

When the WAF challenge fired, the request was stopped at the edge and the backend did not receive the authentication request. That is the design working as intended. The problem was that the edge and the origin did not interpret every representation of the same path identically. In other words, the guard and the kitchen disagreed about which counter an order was for.

2. The setup

The assessment was carried out against a production authentication API, meaning the real, live system, not a test copy. The report does not describe any accounts, roles, tooling or versions beyond the architecture above. The only precondition that matters is that the authentication endpoints were protected by an AWS WAF challenge action at the CDN edge, and that the challenge was applied based on the literal request path. "Literal" is the key word: the WAF compared the address exactly as written, character for character, against its list.

3. Finding it: the same address, two spellings

HTTP requests can represent a path using percent-encoded characters. For example, %6c represents the lowercase letter l, %66 represents f, and %72 represents r. A URL-encoded path can therefore represent the same logical endpoint as its ordinary spelling. The pairs relevant to this investigation were:

Canonical path Encoded representation
/api/v1/login /api/v1/%6cogin
/api/v1/register /api/v1/%72egister
/api/v1/forgotPassword /api/v1/%66orgotPassword

Look at the first row. /api/v1/login is the normal spelling. /api/v1/%6cogin is the same address with the first letter of login written as %6c. To a human these are obviously the same page. To a computer that compares strings literally, they are different strings. The second row does the same with the r in register, and the third with the f in forgotPassword.

The security issue was not percent-encoding itself. Percent-encoding is a normal, necessary part of the web. The issue was that the WAF evaluated the incoming path in a form that did not match the protected literal path, while the origin subsequently decoded the encoded character and routed the request to the real authentication handler. The WAF effectively saw a different path representation from the one ultimately processed by the backend. Think of a bouncer with a guest list of names spelled exactly one way, and a venue inside that accepts nicknames: the bouncer turns away "Jonathan" but waves through "Jon" because it is not on the list, and the venue inside knows perfectly well who "Jon" is.

4. Step 1: establish a baseline

Before investigating the encoded paths, the researcher established the behaviour of the ordinary authentication routes. Why? Because you cannot claim something is unusual until you know what usual looks like. This is the control in the experiment: the normal request that everything else is compared against.

A request to the canonical login endpoint produced a response with these characteristics:

HTTP
HTTP/2 202
server: CloudFront
x-amzn-waf-action: challenge
content-length: 0

Line by line:

  • HTTP/2 202 is the status line. The connection used version 2 of HTTP, and the server answered 202, which means "accepted".
  • server: CloudFront says the machine that answered was Amazon CloudFront, the CDN. That tells you the request was handled at the edge, not by the application.
  • x-amzn-waf-action: challenge is the giveaway. This header is the WAF announcing that it applied a challenge. It is the equivalent of the guard saying "you shall not pass until you prove yourself".
  • content-length: 0 says the body is empty. There is nothing to read; the response exists only to deliver the challenge.

The response had an empty body and included the WAF challenge indicator. This established the intended control behaviour: the request was being challenged at the edge rather than processed normally by the authentication application. The same general challenge behaviour was observed for the canonical registration and password-recovery paths. So all three normal addresses were guarded.

5. Step 2: test the encoded path

The researcher then compared the response from the canonical login path with the response from its percent-encoded equivalent. The encoded request used the same HTTP method, host, content type and controlled invalid credentials. The path was the relevant difference. Keeping everything else identical is what makes this a fair test: if only one thing changed, only that one thing can explain a different result. "Controlled invalid credentials" means deliberately wrong username and password, so that even if the request got through, nothing real could happen.

Instead of receiving the empty edge challenge response, the encoded request returned a response resembling:

HTTP
HTTP/2 200
server: awselb/2.0
content-type: application/json

Line by line:

  • HTTP/2 200 means "here is your content, all fine". No challenge, no refusal.
  • server: awselb/2.0 is a completely different signature. This is an AWS load balancer, which sits behind the WAF, closer to the application. The edge did not answer this time; something further in did.
  • content-type: application/json says the body is structured data in JSON format, the format APIs use to exchange information. A challenge response has no body; this one does.

The response body contained an application-level authentication error:

JSON
{
  "error": true,
  "errorCode": "InvalidCredential",
  "errors": [
    {
      "code": 4318
    }
  ],
  "data": {
    "sessionAttemptId": "..."
  }
}

Line by line:

  • "error": true says something went wrong, from the application's point of view.
  • "errorCode": "InvalidCredential" is the application's own label for "the username or password you sent is wrong". This is the login code talking, not the WAF.
  • "errors": [ { "code": 4318 } ] is a list of error details; 4318 is the application's internal code for this particular failure.
  • "data": { "sessionAttemptId": "..." } is a field the application returns to track a login attempt. The value is shown as ... because the report generalises it.

The identifiers and session-related values above are illustrative and have been omitted or generalised.

This response was materially different from the baseline. The canonical request received an edge challenge, while the encoded request reached the real login handler and returned its normal application-level response. The evidence supporting this conclusion included:

  • The absence of the WAF challenge indicator on the encoded request.
  • A different server-response signature consistent with the origin path.
  • A structured authentication error returned by the actual application handler.
  • The same distinction reproduced across other authentication routes.

The important finding was not simply that the encoded URL returned HTTP 200. An HTTP status code alone does not establish a security bypass. Plenty of harmless things return 200. The stronger evidence was that the response changed from an edge-generated challenge to the expected behaviour of the backend authentication handler. In other words, the researcher did not just see a different number; they saw a different speaker. The guard had been replaced by the kitchen, and the kitchen was answering orders.

6. Step 3: reproduce across authentication endpoints

The same normalisation mismatch was observed on three authentication routes.

Functionality Encoded character Observed behaviour
Login l → %6c Reached the login handler
Registration r → %72 Reached registration validation
Password recovery f → %66 Reached the password-recovery handler

The ordinary forms of these paths continued to receive the WAF challenge. The encoded forms reached the corresponding application handlers. Why test all three? Because a single lucky result could be a fluke or a quirk of one endpoint. Finding the same pattern on three separate functions shows it is a property of the shared WAF rule, not an accident.

For registration, the application returned a field-validation error. This showed that the request had progressed into application-level processing rather than being stopped by the edge challenge. A validation error means the application read the submitted fields and judged them; a WAF challenge never gets that far. For password recovery, the handler returned its normal success-shaped response. That response established handler reachability, but it did not independently prove that an email was delivered or that a password was changed. "Success-shaped" means the reply looked like the normal success reply; it is evidence the code ran, not evidence of the side effect.

These distinctions matter when assessing impact. The evidence established that the edge challenge could be bypassed to reach the authentication handlers. It did not establish successful account compromise or successful password recovery against a real user. This restraint is a mark of a good report: claim exactly what the evidence shows, no more.

7. Step 4: measure the remaining rate limit

After confirming the challenge bypass, the researcher examined whether application-level rate limiting compensated for the missing edge control. The logic: if the guard is gone, maybe the kitchen still refuses to cook too fast. That would soften the impact.

In a controlled burst test, 30 requests were sent to the encoded login path. The reported results were:

Measurement Observed result
Total requests 30
Requests that reached the handler 22
Handler-reaching rate 73.3%
Requests not counted as reaching the handler 8

Read the table as a simple score: out of 30 attempts, 22 got all the way to the login code, which is 73.3 percent. The other 8 did not get counted as reaching the handler.

Some responses included an application-level rate-limit error, identified by code 4331. However, rate-limit responses appeared intermittently rather than consistently blocking the burst. The encoded path also continued to avoid the edge challenge. These results indicated that the application-level rate limiter did not fully replace the bypassed edge control under the tested conditions. In everyday terms: the kitchen sometimes said "slow down", but not reliably, and the guard never came back.

There are important limits to this measurement. A single 30-request burst does not establish the application's behaviour under every traffic pattern, account configuration, source address or time window, nor does it establish a sustainable attack rate. It does, however, provide evidence that the remaining rate limit was not an effective substitute for the challenge during this specific test. Thirty requests is a snapshot, not a stress test; the researcher says so plainly rather than extrapolating.

8. Root cause: the decision happened too early

The underlying failure involved inconsistent interpretation of the request path. The observed processing sequence was:

Text
Client sends percent-encoded path
              |
              v
CDN / WAF evaluates literal path
              |
              v
Expected path rule does not match
              |
              v
Request passes without the challenge
              |
              v
Origin decodes the encoded character
              |
              v
Decoded path matches an authentication route
              |
              v
Real application handler processes request

Walk down the diagram. The client (the browser or script) sends the disguised address. The WAF looks at the address exactly as written and compares it to its list. The list says /api/v1/login; the request says /api/v1/%6cogin; they do not match, so the rule does not fire. The request passes without a challenge. Then the origin decodes %6c back to l, sees /api/v1/login, recognises it as an authentication route, and hands it to the real handler.

The edge applied its security decision before the request representation had been normalised consistently with the origin's routing behaviour. The WAF and the backend therefore disagreed about the effective request path. This is an example of a parser or normalisation differential: different components may interpret the same input differently because they apply transformations at different stages. When security rules depend on one representation and application routing depends on another, an attacker may be able to reach functionality that the edge was intended to protect.

A path-normalisation difference is not automatically a vulnerability. It becomes a security issue when the difference defeats an intended security control. In this case, the edge challenge was specifically intended to restrict automated access to authentication entry points. The canonical requests were challenged, while encoded requests reached the backend without that challenge. That established a direct relationship between the normalisation mismatch and the security-control bypass. The finding was therefore not based solely on unusual URL parsing; it was based on a demonstrated difference in enforcement.

The critical question was whether the alternative path representation reached a handler that the normal representation could not reach without passing the challenge. The observed responses supported the conclusion that it did.

9. Impact: what this could mean in the real world

The primary impact was the removal of an intended anti-automation barrier from production authentication endpoints. Because the encoded paths reached the actual handlers, automated clients could interact with the login, registration and password-recovery logic without triggering the configured challenge.

Credential stuffing and password spraying. The bypass could reduce the effectiveness of an edge challenge intended to discourage or interrupt automated login attempts. Depending on the application's remaining controls, this could increase exposure to credential stuffing or password spraying. The test demonstrated handler reachability and inconsistent rate-limit responses. It did not demonstrate a successful login using another user's credentials.

Automated registration attempts. The registration handler could be reached without the intended edge challenge. This could facilitate automated registration attempts if additional application-level protections are insufficient. The test established handler reachability, not successful abuse of real registrations at scale.

Password-recovery abuse. The password-recovery handler could also be reached without the edge challenge. This could facilitate repeated password-recovery requests, depending on the application's additional controls. The observed response did not prove that messages were sent or that any user's account was compromised.

Security-control inconsistency. The broader concern is that a protection configured at the edge did not reliably cover the backend functionality it was meant to protect. Any security assessment that considers only the canonical URL could therefore miss an alternative path representation that reaches the same handler. This is a lesson for testers as much as for defenders: if you only ever try the obvious spelling, you only ever test the obvious spelling.

What was confirmed:

  • Canonical authentication paths received a WAF challenge.
  • Percent-encoded path variants avoided that challenge.
  • The encoded variants reached the real login, registration and password-recovery handlers.
  • The behaviour was observed across all three authentication routes.
  • The tested burst reached the login handler for 22 of 30 requests.
  • Application-level rate-limit errors appeared intermittently.
  • The edge challenge was not consistently reapplied to the encoded paths.

What was not established by these tests:

  • Successful account takeover.
  • Successful credential stuffing against real accounts.
  • Successful password spraying.
  • Confirmed delivery of password-recovery messages.
  • A particular sustainable request rate under prolonged load.
  • Complete absence of all other anti-abuse controls.

The demonstrated vulnerability was the bypass of the edge challenge. Downstream account abuse was a realistic risk, not a confirmed outcome of the supplied proof of concept.

10. The fix

The core fix is to make the security decision consistent with the application's eventual route interpretation. In plain words: the guard and the kitchen must agree on what an address means before either acts on it. The report recommends the following.

  1. Normalise paths before applying path-based security rules. The edge should evaluate a canonical representation of the request path, using well-defined normalisation behaviour consistent with the origin. Equivalent path representations should not receive different protection merely because a character is percent-encoded. Normalisation must be implemented carefully so that it does not introduce new routing ambiguities or alter legitimate application behaviour. In everyday terms: decode the address the same way the kitchen does, then check the list.
  2. Enforce protection at the route or handler level. Where possible, associate the anti-automation control with the actual authentication route rather than relying solely on a literal path match at the edge. An origin-level or application-level control can provide defence in depth if a request reaches the handler through an unexpected representation. In everyday terms: put a second guard inside the kitchen, so a disguised order still gets checked.
  3. Apply consistent rules across authentication endpoints. Login, registration and password recovery should have consistent anti-abuse protections. The fix should cover every supported version and route, not just the first endpoint discovered. If you fix only /login, the same trick still works on /register.
  4. Strengthen application-level rate limiting. Rate limiting should be independently enforced at the authentication layer. Appropriate controls may include account-based and source-based limits, progressive delays, monitoring and additional verification when abuse is detected. These controls should not depend exclusively on the WAF challenge being present. In everyday terms: the kitchen should have its own rule about how fast it serves, not rely on the front door.
  5. Test normalisation behaviour during security validation. Regression tests should compare canonical and encoded path variants. They should verify that equivalent paths receive the same security treatment and that unexpected representations cannot bypass the challenge. A regression test is an automated check that keeps a fixed bug fixed.
  6. Review other protected routes. If the same path-matching strategy is used elsewhere, other protected endpoints may share the same design weakness. The review should prioritise authentication and other sensitive operations, while confirming any additional findings individually. In everyday terms: if one door had a broken lock, check the other doors.

11. Variants to test: the methodology, step by step

The report closes with a repeatable methodology for finding edge-versus-origin discrepancies. Each step below says what to do, why, and what a positive result looks like.

  1. Establish baseline behaviour. Send a normal request to the protected endpoint and record the status code, response headers, response body and any explicit WAF challenge indicators. Why: you need a reference point before you can spot an anomaly.
  2. Understand the intended security boundary. Determine whether the request is stopped at the edge or reaches the backend. Do not assume that an HTTP response proves which component handled the request. Why: knowing who answered tells you whether the guard is even in the conversation.
  3. Examine path parsing and normalisation. Investigate whether URL-encoded characters or other equivalent path representations are handled consistently across the request-processing chain. Only test systems and endpoints for which you have authorisation. Why: this is the actual hypothesis under test. The authorisation point is not a formality: testing systems you do not own or have permission to test is illegal in many places.
  4. Compare equivalent requests. Change the path representation while keeping the method, body, headers and other relevant variables constant. A controlled comparison makes it easier to isolate the factor responsible for the difference. Why: if you change five things and the result changes, you do not know which of the five mattered.
  5. Verify handler reachability. Look for evidence that the backend processed the request, such as application-specific validation errors or structured responses that differ from the edge challenge. Avoid treating a changed status code alone as conclusive proof. Why: a different number could mean anything; a different speaker with its own vocabulary is much stronger evidence.
  6. Check all relevant endpoints. A shared WAF rule may affect several routes, but each endpoint should be checked to establish the actual scope. Why: scope is part of the finding; one endpoint is a bug, three endpoints is a pattern.
  7. Evaluate compensating controls. Determine whether application-level rate limits continue to operate and document the precise test conditions. Avoid extrapolating a small test burst into claims about unlimited throughput. Why: the impact depends on what other defences remain, and honest measurement beats guesswork.
  8. Stop at the necessary proof. Demonstrating that an authentication handler can be reached without the intended challenge is sufficient to establish the control bypass. There is no need to attempt account takeover, attack real users or generate large volumes of authentication traffic to prove the underlying issue. Why: the goal is to prove the flaw, not to cause harm. Going further risks breaking the law and hurting real people for no extra evidence.

The complete chain was:

Text
Percent-encoded authentication path
                 |
                 v
Edge rule misses literal-path match
                 |
                 v
Challenge action is not applied
                 |
                 v
Origin decodes the path
                 |
                 v
Authentication handler is reached
                 |
                 v
Application-level rate limiting remains
                 |
                 v
Automated access is less constrained

This is the same story as the root-cause diagram, told from the attacker's point of view: disguise the address, slip past the rule, get decoded by the origin, reach the handler, and find only the application's own rate limit in the way, which the burst test showed to be inconsistent.

The broader lesson is that security controls must operate on the same effective request semantics as the application they protect. When a WAF and an origin disagree about which endpoint a request represents, the gap between those interpretations can become a security boundary failure.

Glossary

  • API (application programming interface): the part of a service that programs talk to, rather than people; it receives requests and returns structured data.
  • Authentication: the process of proving who you are, usually with a username and password.
  • AWS WAF: Amazon's web application firewall service, which inspects requests and can block or challenge them according to rules.
  • Baseline: the normal, expected response recorded before testing, used as a reference point for comparison.
  • Burst test: sending a batch of requests in a short period to observe how the system reacts.
  • Canonical path: the standard, plain spelling of an address, such as /api/v1/login.
  • CDN (content delivery network): a network of front-end servers that sit in front of a website to speed it up and absorb attacks; CloudFront is Amazon's.
  • Challenge: a test a WAF sends to check whether a client is a real person, such as invisible JavaScript or a puzzle; passing it earns a token.
  • Content type: a header saying what format the body is in, such as application/json.
  • Credential stuffing: trying username/password pairs stolen from one breach against another site, hoping for password reuse.
  • Defence in depth: layering several independent protections so that one failing does not leave the system open.
  • Edge: the front layer of a system, such as the CDN and WAF, as opposed to the origin behind it.
  • Endpoint: one specific address on an API that performs one specific job, such as /api/v1/login.
  • Handler: the piece of application code that actually processes a request for a given route.
  • Header: a labelled line of metadata in a request or response, such as server: CloudFront.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • HTTP status code: the three-digit number at the start of a response, such as 200 or 202, summarising what the server did.
  • JSON: a text format for structured data, widely used by APIs.
  • Literal path match: comparing an address exactly as written, character for character, against a list.
  • Load balancer: a traffic cop that receives requests and forwards them to one of several back-end servers.
  • Normalisation: reducing different spellings of the same thing to one standard form.
  • Origin: the company's real back-end server that runs the application code, as opposed to the edge in front of it.
  • Parser differential: when two components interpret the same input differently because they transform it at different stages.
  • Password spraying: trying one common password against many usernames.
  • Percent-encoding: writing a character as a percent sign plus two hexadecimal digits, such as %6c for l.
  • Production: the real, live system used by actual people, as opposed to a test copy.
  • Rate limiting: a cap on how many requests a client may make in a period.
  • Regression test: an automated check that keeps a fixed bug from coming back.
  • Request: a message a client sends to a server asking for something.
  • Response: the message a server sends back, containing a status, headers and usually a body.
  • Route: the mapping from an address to the code that handles it.
  • Server header: a response header naming the software that answered, such as server: awselb/2.0.
  • Token: a small string proving something, such as that a challenge was passed.
  • Validation error: an error returned when submitted data fails the application's own checks, showing the application processed it.
  • WAF (web application firewall): a security layer that inspects requests and blocks or challenges suspicious ones before they reach the application.

More by redhunter01

View all

24 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.