Skip to main content

Bypassing WAFs and Rate Limits in 2025: Techniques That Still Work (Ethically)

 

Bypassing WAFs and Rate Limits in 2025: Techniques That Still Work (Ethically)

If you’ve been doing bug bounty or security testing for even a short while, you probably know this feeling:

You discover a promising vulnerability…
You try your payload…
And then — blocked by WAF.
Or worse — 429 Too Many Requests shuts you down mid-testing.

Welcome to the world of Web Application Firewalls and Rate Limiting.
Two layers are designed to protect applications, but often implemented imperfectly.

Here’s the good news:

Many WAF and rate limit bypass techniques still work in 2025, even against modern cloud providers like Cloudflare, Imperva, Akamai, AWS WAF, and Fastly.

This article explains how testers bypass them, why these methods work, and — most importantly — the ethical rules you must follow.


1. Understanding What WAFs Actually Do (And What They Don’t)

A Web Application Firewall is not a bodyguard.
It’s more like a security camera with built-in pattern recognition.

It watches incoming requests and tries to catch:

  • SQLi patterns

  • XSS payloads

  • command injection

  • SSRF indicators

  • path traversal attempts

But the fundamental limitation is simple:

A WAF does not understand your application.
It only understands patterns.

And because attackers know the patterns WAFs look for, they simply… avoid them.


2. Why WAF Evasion Is Still Possible in 2025

Despite machine learning and behavioral signatures, WAFs still suffer from:

1. Overreliance on pattern-based signatures

If the WAF looks for UNION SELECT, attackers send UN/**/ION SEL/**/ECT.

2. Protocol parser differences

Servers and WAFs often parse input differently.
This creates desync opportunities where the WAF sees “safe” traffic, but the server sees an attack.

3. Poor rule customization

Many companies just turn on “default rules” instead of tuning.

4. Blind trust in vendor marketing

“You’re safe because Cloudflare is on.”
(Spoiler: Cloudflare only blocks what it can detect.)





3. Core WAF Bypass Techniques (That Still Work)

Below are real-world WAF bypass categories used ethically in bug bounty programs.
These are not for malicious use — always stay inside the program scope.


A. Payload Encoding Tricks

1. Case Switching

Most WAFs normalize case — but not all.

UnIoN SeLeCt

2. Over-encoding

Double, triple, or mixed encoding confuses shallow filters.

Examples:

  • URL encode (%3Cscript%3E)

  • Double encode (%253Cscript%253E)

  • HTML encode (<script>)

3. Unicode Normalization

WAF sees harmless characters.
Server normalizes into an armful payload.

Example XSS:

<sсript>alert(1)</sсript>

(Those “c” characters are Cyrillic.)


B. Breaking Up the Payload

1. SQL comment injection

UN/**/ION SEL/**/ECT

2. String concatenation

UN'ION SEL'ECT

3. Parameter smuggling

?id=1;SELECT/**/1

When combined with encoding, this bypasses many legacy filters.


C. HTTP Desync Tricks (WAF sees one request, server sees another)

This is one of the most powerful modern techniques.

1. Content-Length vs Transfer-Encoding mismatch

WAF interprets the request based on one header.
The server interprets another.

Payload hides inside the difference.

2. Header injection

Split a request into two using:

%0d%0a

WAF inspects the first part → misses the second.

3. Duplicate headers

Servers often accept the last header.
WAFs may use the first.

Example:

Host: target.com Host: attacker.com

This can lead to SSRF or cache poisoning bypasses.


D. Using Alternate HTTP Methods

A surprising number of WAF rules apply only to GET and POST.

Try:

  • HEAD

  • PUT

  • OPTIONS

  • TRACE

  • MOVE

  • DELETE

Often, a blocked SQLi payload through POST works instantly through OPTIONS or HEAD.


E. Content-Type Mismatches

Developers often forget that WAF rules apply differently to body types.

Try sending the same payload using:

  • application/json

  • multipart/form-data

  • application/xml

  • text/plain

Some WAFs barely inspect multipart bodies.


F. Browser-Based Payload Delivery

Some WAFs inspect only raw HTTP payloads, not browser-native encodings like:

  • FormData()

  • Blob()

  • Base64 scripts

  • Fetch API with blobs

  • WebSocket upgrade requests

A classic example:

XSS payload blocked in GET → allowed inside a WebSocket message frame.


G. Using Valid Domain Features to Hide Attack Payloads

1. Using legitimate CDNs

Loading malicious payloads from trusted domains like:

https://ajax.googleapis.com/

WAF often does not inspect external script content.

2. Hiding payloads in image metadata

EXIF → stored XSS or command injection.


H. Business-Logic Bypass (Non-technical but extremely common)

Sometimes you don’t need a technical bypass:

  • A field is validated on UI but not on API.

  • Mobile client bypasses WAF rules.

  • Internal endpoints have no WAF at all.

  • Legacy v1 APIs bypass Cloudflare, but v2 is protected.

Business logic gaps are often the easiest “WAF bypass.”


4. Rate Limit Bypassing Techniques That Still Work

Most rate limiting is IP-based.
So attackers use:


A. Multiple IP Sources

  • VPN rotation

  • Tor nodes

  • Mobile hotspot cycling

  • Cloud VM rotation

But the more ethical and legal method during bug bounty is:

✔ Using X-Forwarded-For Spoofing

If the server trusts XFF:

X-Forwarded-For: 1.1.1.1

You instantly “reset” rate limit counters.

Try sending each request with a different spoofed IP:

X-Forwarded-For: 10.0.0.1 X-Forwarded-For: 10.0.0.2 X-Forwarded-For: 10.0.0.3

Many APIs still fall for this in 2025.


B. Parameter Randomization

Some rate limits apply per resource, not per endpoint.

If /login rate limits:

Try:

/login?123 /login?abc

The backend sees completely different cache keys.


C. Distributed Requests (“Queue-bursting”)

Send:

  • 100 requests slowly (warmup phase)

  • 20 requests very fast (burst phase)

WAFs detect consistent bursts, not mixed patterns.


D. Changing HTTP Methods

If POST is rate-limited:

Try:

GET /login HEAD /login OPTIONS /login

Some rate limiters ignore alternate methods.


E. Using GraphQL

GraphQL often bypasses REST rate limits entirely.

Example query:

query { login(username:"admin", password:"pass") }

F. Using WebSockets

Once the WebSocket is open, many rate-limiters do not inspect the stream.


5. Caveats — What You Must Understand

Before trying WAF/rate-limit bypasses, understand these risks:


1. You Can Trigger Security Alerts Without Knowing

Even if a bypass works, the security team still sees the logs.

They may:

  • temporarily block your account

  • rotate API keys

  • soft-ban your account in the WAF panel

Always warn the triage team if you are performing high-volume testing.


2. Accidental DoS is very common

One mistake most beginners make:

Sending too many requests too quickly.

It may:

  • Overload the app

  • freeze a microservice

  • block legitimate customers

This violates almost every bug bounty policy.


3. Working with WAFs requires nuance

A WAF bypass does not automatically mean critical severity.

Example:

Bypassing WAF → performing harmless XSS → if the app sanitizes it server-side anyway → low severity.

WAF bypass only matters if it leads to a real vulnerability.


6. Ethics: What You Can & Cannot Do

YES (Allowed)

✔ Testing within bug bounty scope
✔ Sending low-volume experimental payloads
✔ Validating bypass without harming users
✔ Reporting bypass + underlying vulnerability

NO (Not Allowed)

❌ Mass scanning
❌ DDoS
❌ Brute force attacks
❌ Attacks against endpoints not in scope
❌ Spamming production users
❌ Using stolen cookies, credentials, or tokens

Your goal is research, not disruption.


7. Real-World Example Scenarios

Here are simplified examples that reflect real bug bounty cases.


Example 1: XSS Blocked by Cloudflare

Payload:

<script>alert(1)</script>

Blocked.

Bypass:

<svg/onload=alert(1)>

Cloudflare allows it.

Impact: Stored XSS → Critical.


Example 2: Login Brute-force Rate Limit Bypass

Normal login blocked after 5 tries.

But backend trusts X-Forwarded-For.

Sending:

X-Forwarded-For: 10.0.0.1 X-Forwarded-For: 10.0.0.2 ...

Unlimited attempts.

Impact: Account takeover.


Example 3: SQLi via JSON Payload

WAF rules apply only to URL parameters.

Payload inside JSON:

{"email":"test' OR 1=1--"}

WAF misses it.
The database interprets normally.

Impact: Full SQL extraction.


8. Defensive Recommendations (For Developers)

Since this article is also educational for defenders:

1. Use behavior-based WAF modes

Signature-only mode is not enough.

2. Validate on server-side, not just WAF-side

WAF is the first wall, not the last.

3. Avoid trusting X-Forwarded-For headers

Use trusted proxy headers only.

4. Enforce strict per-account rate limits

Not per IP.

5. Monitor anomalies, not just volume

Attackers hide inside patterns.


9. Final Thoughts

Bypassing WAFs and rate limits is not about being “smart.”
It’s about understanding how the system thinks, then thinking around it.

In bug bounty, these bypasses matter because:

  • They unlock hidden vulnerabilities

  • They prove impact

  • They demonstrate creativity

  • They show depth of testing

But with great power comes responsibility.

A WAF bypass is a tool, not a goal.
Use it ethically, carefully, and only against systems that asked you to test them.

Comments

Popular posts from this blog

Practical XSS: DOM vs Reflected vs Stored — Advanced Payloads & Bypasses

Practical XSS: DOM vs Reflected vs Stored in 2025 (Payloads & Bypasses) If you hunt bugs, run red teams, or build web apps, XSS still matters in 2025. It is one of the easiest ways to jump from “weird UI bug” to full account takeover, even on big platforms. Cross-site scripting (XSS) is when an attacker runs their own JavaScript in someone else’s browser using a vulnerable site. The three main flavors are simple to say, hard to defend: reflected XSS (comes back in a single response), stored XSS (saved on the server), and DOM-based XSS (triggered by client-side code). This guide focuses on real payloads and modern bypass tricks, not just alert(1) . You will see how attackers build and adapt payloads for each type, and how filters, CSP, and WAFs can fail in practice. It is written for people who already get basic HTTP and HTML and want to level up their XSS game. Quick XSS refresher: DOM vs reflected vs stored in simple terms Photo by Markus Winkler In 2025, XSS is still one of the...

API Authorization Flaws (Broken Object Level & Function Level Auth)

  API Authorization Flaws: BOLA and BFLA Explained for Real-World Security APIs are the hidden pipes that keep modern apps running. Your banking app, ride sharing app, and social media feed all depend on APIs to send and receive data behind the scenes. When those APIs make simple mistakes in authorization , private data leaks. You do not always need complex malware. Often, attackers just change an ID or call a hidden function. Two of the worst mistakes are Broken Object Level Authorization (BOLA) and Broken Function Level Authorization (BFLA). Both BOLA and BFLA appear in the OWASP API Security Top 10 that teams still follow as of 2025, based on the latest 2023 list, where BOLA is ranked number 1 and BFLA is number 5. This post breaks down what these flaws are, how attackers abuse them, and clear steps your team can take to prevent them. What Are API Authorization Flaws and Why Do They Matter? Photo by Markus Winkler To understand API authorization flaws, start with two si...

Chain Exploits: From Information Leak to RCE in 2025

 Chain Exploits: From Information Leak to RCE in 2025 A lot of people picture hacking as one big magic trick. In reality, most modern attacks are a chain of small, boring bugs that line up in a very bad way. Two of the most dangerous links in that chain are an information leak and remote code execution (RCE). An information leak is any bug that reveals data that should stay private. RCE is a bug that lets an attacker run their own code on your server or node from far away. On their own, each bug might look minor. Together, they can give an attacker full control of your web app, CI pipeline, or blockchain stack. In 2025, with DeFi protocols, Web3 dashboards, and npm-heavy codebases everywhere, this pattern is more common than people think. This post walks step by step from a tiny leak to full system control, using simple language and real style examples from npm supply chain attacks and DeFi exploits. What Is a Chain Exploit and Why Does It Matter for Security in 2025? A chain explo...