Skip to content
DoS Write-up Advanced

Exploiting QUIC's Path Validation

A malicious client can send many PATH_CHALLENGE frames on an existing QUIC connection, forcing the server to queue an unbounded number of PATH_RESPONSE frames. By manipulating congestion control to reduce the server's send rate, the attacker can exhaust the server's memory, causing a denial of service.

Marten Seemann Follow

Published on seemann.io

QUIC supports connection migration, allowing the client to migrate an established QUIC connection from one path to the other. QUIC’s path validation mechanism can be used to attack the peer and make it consume an unbounded amount of memory.

Marten Seemann, on seemann.io

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. 6 min read.

Context

QUIC, the transport protocol standardised as RFC 9000, supports connection migration: an established connection can move from one network path to another over its lifetime. Unlike TCP, where a connection is identified by the 4-tuple of client and server IP:port, a QUIC connection can switch to a new 4-tuple. This is what lets a connection start on WiFi and be migrated to a cellular link when the user walks away from the access point. At any point in time only a single path is used to send application data, but the client can probe a second path while the first is still active, so it can switch quickly if the old path degrades.

Path validation is the mechanism behind that probing. The client sends a packet containing a PATH_CHALLENGE frame on the new path (a probing packet). The frame carries 8 bytes of unpredictable data, and the server is expected to answer with a PATH_RESPONSE frame that echoes those 8 bytes. The exchange also serves as the only way to measure the round-trip time of the new path, because the acknowledgement for the probe packet travels on the old path. The client times the interval between sending PATH_CHALLENGE and receiving the matching PATH_RESPONSE, which is why sending a few probing packets makes sense: it guards against loss of either frame and gives a more reliable RTT measurement.

The vulnerability described here is a denial of service in that mechanism. It was discovered in October 2023 and disclosed to the IETF QUIC working group. It is the first attack against the QUIC protocol itself rather than against a particular implementation: any RFC 9000-compliant implementation is necessarily vulnerable. Several implementations were affected, including quic-go, Cloudflare's quiche and Fastly's quicly. Other vendors were notified and found not to be affected. The vulnerability was disclosed on 12 December 2023, affected implementations released fixes, and updating is recommended.

Setup

No accounts, credentials or special tooling are described. The attack is carried out by a malicious QUIC client against a QUIC server, and the preconditions are those of any client that can send packets to the victim: the client must be able to send packets containing PATH_CHALLENGE frames and to control which packets it acknowledges and when. The reasoning applies to any RFC 9000-compliant server implementation; the three implementations named above were vulnerable.

Finding it

The starting point is the observation that the exchange of PATH_CHALLENGE and PATH_RESPONSE frames can be used to determine the RTT of a new path, and that this is the only way to do so, since the acknowledgement for the probe packet is sent on the old path. From there, the question is what happens when a peer sends far more PATH_CHALLENGE frames than a path validation would ever need. The RFC requires that each and every PATH_CHALLENGE frame is answered with a PATH_RESPONSE frame, so a server that receives a flood of challenges has to produce a matching flood of responses. If the server cannot send them as fast as they arrive, it has to queue them.

A second observation makes the queue grow without bound: the attacker is effectively in control of the rate at which the victim is able to send new packets, through congestion control. QUIC implementations use a congestion controller to limit their send rate, and virtually all algorithms in use react to packet loss by reducing that rate, on the assumption that loss means a router queue on the path has overflowed. A client that selectively acknowledges the packets it received can make the server believe that many packets were lost, and the server will shrink its congestion window accordingly.

Exploitation

Step 1: Flood the victim with PATH_CHALLENGE frames

The attacker sends a large number of packets containing PATH_CHALLENGE frames. The victim is forced to send a PATH_RESPONSE in response to every such frame. The challenges do not need to be sent on a new path: although path validation is primarily intended for probing new paths, it is valid to send PATH_CHALLENGEs on existing paths, so the attacker does not need to establish a second path first.

Step 2: Suppress the victim's send rate with selective acknowledgement

The attacker selectively acknowledges the packets it received, making the victim think that lots of packets were lost. The server concludes that the respective packet was lost and reduces its congestion window. With enough packet loss, the congestion window falls to its minimum value of just 2 packets per RTT when using the New Reno or Cubic congestion controller.

Step 3: Inflate the measured RTT

To reduce the send rate further, the attacker only acknowledges packets that were received after a certain time period. For example, it can decide to acknowledge only packets received 1s ago. With an actual RTT of 20ms, the victim now concludes that the RTT is 1020ms, which reduces the send rate by a factor of more than 50.

Step 4: Let the response queue grow

While the victim's send rate is pinned down by the two manipulations above, the attacker keeps sending a flood of PATH_CHALLENGE frames. The victim has no choice but to queue an ever-growing number of PATH_RESPONSE frames, and the queue eventually exhausts all of its memory.

Root cause

The design mistake is in the specification: the RFC requires that each and every PATH_CHALLENGE frame is responded to with a PATH_RESPONSE frame, with no allowance for ignoring an excessive number of challenges. The RFC requires that each and every PATH_CHALLENGE frame is responded to with a PATH_RESPONSE frame, so a flood of challenges forces a matching flood of responses. Congestion control, which would normally limit how much work a peer can force on a sender, does not help here, because the attacker controls the feedback the congestion controller relies on: selective acknowledgement lowers the congestion window, and delayed acknowledgement inflates the measured RTT. The attacker thus turns the victim's own loss response against it.

Impact

The result is a denial of service: the attacker can make the victim build an unbounded queue of PATH_RESPONSE frames and eventually exhaust all its memory. The attack works against any RFC 9000-compliant implementation, so it is not tied to a single codebase. The three implementations named above were confirmed vulnerable; other vendors were notified and found not to be affected.

Fix

The fix taken in quic-go limits the number of queued PATH_RESPONSE frames to 256. Since a PATH_RESPONSE frame only consumes 16 bytes of memory, this caps memory consumption at just 4 kB per QUIC connection, which makes the attack uninteresting for any attacker. The reasoning behind the limit is that a low single-digit number of PATH_CHALLENGE frames is sufficient under all realistic circumstances to derive a reasonable RTT estimate and to guard against packet loss on a new path, and that a large number of paths is not expected to be probed at the same time, not even when using QUIC for NAT Traversal.

This fix technically makes the implementation non-compliant with RFC 9000, albeit under circumstances that will never occur in the real world. The author argues that the wording of the specification should be changed to allow implementations to defend themselves against this DoS attack, and hopes the non-compliance is only a temporary state.

Variants to test

  • Send PATH_CHALLENGE frames on an existing, already validated path rather than on a new one. A positive result is a server that queues a PATH_RESPONSE for every challenge without any cap, visible as growing memory use under a sustained flood.
  • Combine the challenge flood with selective acknowledgement that marks most packets as lost. A positive result is the server's congestion window collapsing to its minimum (2 packets per RTT with New Reno or Cubic) while the response queue keeps growing.
  • Delay acknowledgements so that only packets received roughly a second earlier are acknowledged. A positive result is the server's measured RTT inflating far beyond the real one, with a corresponding drop in send rate.
  • Probe many paths at once, including in a NAT traversal deployment, and check whether the implementation bounds the number of outstanding PATH_RESPONSE frames per connection. A positive result is an implementation that bounds the number of outstanding PATH_RESPONSE frames per connection.

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. 13 min read.

What happened, in plain words

Imagine you are on a video call on your phone, connected to your home WiFi. You walk out of the front door and keep talking. The call does not drop: your phone quietly moves the conversation onto the mobile network. That smooth handover is one of the things a modern internet transport protocol called QUIC was designed to do.

QUIC is a set of rules for how two computers send data to each other over the internet. It is the thing underneath a lot of what you use every day, including large parts of the web. The rules are written down in a public document called RFC 9000, and anyone who builds a QUIC program is expected to follow them.

In October 2023, a flaw was found in those rules themselves, not just in one company's software. A malicious client could send a server a particular kind of message over and over, and the server, obeying the rules, would dutifully prepare a reply to every single one. Because the attacker could also slow the server's replies down to a trickle, the pile of prepared replies grew and grew until the server ran out of memory and fell over. That is a denial of service: you are not stealing data, you are stopping a service from working.

The important part is that any server that follows RFC 9000 correctly is vulnerable, because the rulebook itself says every one of those messages must be answered. The author reported it to the group that maintains QUIC, the IETF QUIC working group, and it was disclosed publicly on 12 December 2023. Several implementations were affected, including the author's own quic-go, Cloudflare's quiche and Fastly's quicly. Other vendors were told as well and turned out not to be affected. Fixes were released, and the advice is to update.

This article walks through how the attack works, step by step, assuming no prior knowledge of networking or security.

Background: what QUIC and connection migration are

To understand the attack you need one idea first: what a "connection" is.

When two computers talk, each one has an address on the network, much like a house has a postal address. The address is made of an IP address (which machine) and a port number (which door on that machine). A conversation between a client (say, your phone) and a server is normally identified by the pair of addresses at both ends: your address and the server's address. Networking people call that four-part combination a 4-tuple, because it is four values: client IP, client port, server IP, server port.

In the older TCP protocol, if any one of those four values changes, the conversation is over. Your phone switching from WiFi to mobile data changes your IP address, so a TCP connection would break.

QUIC does something different. A QUIC connection can move to a new 4-tuple during its life. This is called connection migration. It is what lets a call or a download start on WiFi and continue on cellular when you walk away from the access point.

There is a detail worth holding on to: even though QUIC can move a connection from one path to another, at any moment only one path is actually carrying your data. The other path is only being tested, so that a switch can happen quickly if the first path gets bad.

The phone has established a QUIC connection to the server via the WiFi link. While that path is still active, it can probe a second path (using the cellular interface) to the server, and switch to this path should the quality of the WiFi path deteriorate. From the original on seemann.io

The picture shows the situation. The phone has a working QUIC connection to the server over WiFi. While that path is still active, the phone can also try a second path, over the cellular interface, and switch to it if the WiFi path gets worse.

Background: how a client tests a new path

Before switching to a new path, the client wants to know that the new path actually works. It does this by "probing" it: sending a small test message and seeing whether an answer comes back.

The test message is a packet containing something called a PATH_CHALLENGE frame. A frame is just a labelled piece of data inside a packet, the way an envelope can contain a letter with a heading. The PATH_CHALLENGE frame carries 8 bytes of unpredictable data, essentially a random number.

When the server receives a PATH_CHALLENGE, the rules say it must answer with a PATH_RESPONSE frame that echoes those same 8 bytes back. Echoing the random number is how the client knows the reply belongs to its own test and is not some stale or forged message.

This back-and-forth has a second use that is not obvious from reading the rules. It is the only way to measure the round-trip time of the new path. Round-trip time, or RTT, is simply how long a message takes to go to the other side and come back, measured in milliseconds. You cannot use the normal acknowledgement for the probe packet to measure it, because that acknowledgement travels on the old path, not the new one. So the client starts a clock when it sends PATH_CHALLENGE and stops it when the matching PATH_RESPONSE arrives.

Because a single packet can get lost, it makes sense to send a few probing packets rather than one. That way, if one challenge or one response goes missing, the test still succeeds, and the RTT measurement is more reliable.

The attack, in outline

Now the flaw. A malicious client can use this testing mechanism to trick the server into building an ever-growing queue of PATH_RESPONSE frames, until the server runs out of memory.

The attacker sends a large number of packets containing PATH_CHALLENGE frames. The rules force the server to send a PATH_RESPONSE for every single one. One important point: these challenges do not have to be sent on a new path. The mechanism is meant for testing new paths, but it is perfectly valid to send PATH_CHALLENGEs on a path that already exists. So the attacker does not need to set up a second network path first.

If the server could send responses as fast as the challenges arrive, there would be no problem. But the attacker can control how fast the server is allowed to send. To see why, you need a short detour into congestion control.

Background: congestion control, in plain words

Congestion control is a way for a sender to avoid overwhelming the network. Think of a motorway: if everyone drives onto it at once, it jams. So each sender keeps a limit on how many packets it will have "in flight" at once, waiting to be acknowledged. That limit is called the congestion window.

QUIC implementations use a congestion controller to set that limit. There are several algorithms for doing this, but almost all of them react to packet loss by reducing the send rate. That makes sense: if packets are being lost, a router somewhere on the path is probably overflowing, so backing off helps everyone.

The key weakness is that the sender decides whether a packet was lost based on what the receiver tells it. The receiver acknowledges the packets it got. If the sender does not see an acknowledgement for a packet, it assumes that packet was lost. An attacker who is the receiver can therefore lie, by choosing which packets to acknowledge and which to stay silent about.

Step by step: how the attack is carried out

Step 1: Flood the victim with PATH_CHALLENGE frames

The victim is forced to send a PATH_RESPONSE in response to every such frame. The challenges do not need to be sent on a new path: although path validation is primarily intended for probing new paths, it is valid to send PATH_CHALLENGEs on existing paths, so the attacker does not need to establish a second path first.

Why this step: it creates the work. Every challenge is a demand for a reply, and the rules do not allow the server to ignore any of them.

Step 2: Suppress the victim's send rate with selective acknowledgement

The attacker selectively acknowledges the packets it received, making the victim think that lots of packets were lost. The server concludes that the respective packet was lost and reduces its congestion window. With enough packet loss, the congestion window falls to its minimum value of just 2 packets per RTT when using the New Reno or Cubic congestion controller.

Why this step: it stops the server from clearing the backlog quickly. By pretending that many packets were lost, the attacker makes the server slow itself down. New Reno and Cubic are two common congestion control algorithms; under enough apparent loss, both shrink the window to its smallest allowed size, two packets per round-trip time.

Step 3: Inflate the measured RTT

To reduce the send rate further, the attacker only acknowledges packets that were received after a certain time period. For example, it can decide to acknowledge only packets received 1s ago. With an actual RTT of 20ms, the victim now concludes that the RTT is 1020ms, which reduces the send rate by a factor of more than 50.

Why this step: the congestion window is measured in packets per round-trip time, so if the server believes the round-trip time is much longer than it really is, it sends even more slowly. The attacker achieves this by delaying its acknowledgements. If the real round trip is 20 milliseconds and the attacker only acknowledges packets a second after receiving them, the server measures about 1020 milliseconds, over fifty times longer, and its send rate drops by a similar factor.

Step 4: Let the response queue grow

While the victim's send rate is pinned down by the two manipulations above, the attacker keeps sending a flood of PATH_CHALLENGE frames. The victim has no choice but to queue an ever-growing number of PATH_RESPONSE frames, and the queue eventually exhausts all of its memory.

Why this step: challenges arrive faster than responses can leave, so the responses pile up. A queue that only grows is a memory leak in slow motion, and when memory runs out the server can no longer serve anyone. That is the denial of service.

Why it works: the root cause

The design mistake is in the specification: the RFC requires that each and every PATH_CHALLENGE frame is responded to with a PATH_RESPONSE frame, with no allowance for ignoring an excessive number of challenges. The RFC requires that each and every PATH_CHALLENGE frame is responded to with a PATH_RESPONSE frame, so a flood of challenges forces a matching flood of responses.

Congestion control, which would normally limit how much work a peer can force on a sender, does not help here, because the attacker controls the feedback the congestion controller relies on: selective acknowledgement lowers the congestion window, and delayed acknowledgement inflates the measured RTT. The attacker thus turns the victim's own loss response against it.

In everyday terms: the rulebook says "always answer every question". The attacker asks millions of questions and simultaneously makes the server answer very slowly. The server's own good manners, and its own careful slowing down when it thinks the network is congested, are what sink it.

What the impact is

The result is a denial of service: the attacker can make the victim build an unbounded queue of PATH_RESPONSE frames and eventually exhaust all its memory. The attack works against any RFC 9000-compliant implementation, so it is not tied to a single codebase. The three implementations named above were vulnerable; other vendors were notified and found not to be affected.

This is why the author calls it the first attack against the QUIC protocol itself rather than against one product. If you wrote a QUIC server strictly by the book, you were exposed.

The fix

The fix taken in quic-go limits the number of queued PATH_RESPONSE frames to 256. Since a PATH_RESPONSE frame only consumes 16 bytes of memory, this caps memory consumption at just 4 kB per QUIC connection, which makes the attack uninteresting for any attacker.

The reasoning behind the limit is that a low single-digit number of PATH_CHALLENGE frames is sufficient under all realistic circumstances to derive a reasonable RTT estimate and to guard against packet loss on a new path, and that a large number of paths is not expected to be probed at the same time, not even when using QUIC for NAT Traversal.

In plain words: a real client only ever needs a handful of challenges to test a path. So the server now keeps at most 256 pending responses, which is a tiny amount of memory, and simply stops answering beyond that. An attacker flooding challenges gains almost nothing.

This fix technically makes the implementation non-compliant with RFC 9000, albeit under circumstances that will never occur in the real world. The author argues that the wording of the specification should be changed to allow implementations to defend themselves against this DoS attack, and hopes the non-compliance is only a temporary state.

That last point matters for anyone learning security: sometimes the correct fix is to break the letter of a standard in a situation the standard never anticipated, and to push for the standard to be corrected.

Things to test if you are checking an implementation

If you wanted to check whether a given QUIC server has this problem, these are the variations worth trying. Each one describes what you would do and what a positive result looks like.

  • Send PATH_CHALLENGE frames on an existing, already validated path rather than on a new one. A positive result is a server that queues a PATH_RESPONSE for every challenge without any cap, visible as growing memory use under a sustained flood.
  • Combine the challenge flood with selective acknowledgement that marks most packets as lost. A positive result is the server's congestion window collapsing to its minimum (2 packets per RTT with New Reno or Cubic) while the response queue keeps growing.
  • Delay acknowledgements so that only packets received roughly a second earlier are acknowledged. A positive result is the server's measured RTT inflating far beyond the real one, with a corresponding drop in send rate.
  • Probe many paths at once, including in a NAT traversal deployment, and check whether the implementation bounds the number of outstanding PATH_RESPONSE frames per connection. A positive result is an implementation that bounds the number of outstanding PATH_RESPONSE frames per connection.

Glossary

  • QUIC: a modern internet transport protocol, standardised as RFC 9000, that carries data between two computers and supports moving a connection between networks.
  • RFC 9000: the public specification document that defines how QUIC must behave.
  • IETF QUIC working group: the group of people within the Internet Engineering Task Force who maintain and develop the QUIC standard.
  • Connection: an ongoing conversation between a client and a server, identified by their addresses.
  • 4-tuple: the four values that identify a connection: client IP address, client port, server IP address, server port.
  • TCP: an older internet transport protocol in which a connection breaks if any part of the 4-tuple changes.
  • IP address: the numeric address of a machine on a network.
  • Port: a numbered "door" on a machine, so several conversations can share one address.
  • Connection migration: QUIC's ability to move an established connection from one network path to another, for example from WiFi to cellular.
  • Path: the route between a client and a server, defined by their addresses at that moment.
  • Probing: testing a path by sending a small message and waiting for an answer, to see whether the path works.
  • Packet: a small chunk of data sent over a network.
  • Frame: a labelled piece of data inside a packet.
  • PATH_CHALLENGE: a frame carrying 8 bytes of unpredictable data, sent to test a path.
  • PATH_RESPONSE: the reply frame that echoes the 8 bytes of a PATH_CHALLENGE.
  • Round-trip time (RTT): how long a message takes to travel to the other side and back, usually measured in milliseconds.
  • Congestion control: the mechanism a sender uses to limit how fast it sends, so it does not overwhelm the network.
  • Congestion window: the limit on how many packets a sender will have in flight at once.
  • New Reno and Cubic: two common congestion control algorithms; under heavy apparent loss both shrink the window to two packets per round-trip time.
  • Acknowledgement: a message from the receiver telling the sender which packets arrived.
  • Selective acknowledgement: acknowledging only some of the packets received, so the sender believes the rest were lost.
  • Packet loss: a packet that never reaches its destination.
  • Denial of service (DoS): an attack that stops a service from working, for example by exhausting its memory, rather than stealing data.
  • Queue: a line of items waiting to be handled; here, PATH_RESPONSE frames waiting to be sent.
  • Memory exhaustion: running out of the working memory a program needs, which typically makes it crash or stop serving.
  • quic-go: a QUIC implementation written in the Go programming language, maintained by the author.
  • quiche: Cloudflare's QUIC implementation.
  • quicly: Fastly's QUIC implementation.
  • NAT traversal: techniques for getting two machines to connect directly when they sit behind network address translation, which normally hides them from each other.
  • Non-compliant: not following the letter of a specification.
  • kB: kilobyte, roughly a thousand bytes of memory.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.