A Memcached DDoS attack is a reflection attack in which criminals send small, spoofed UDP requests to internet-exposed Memcached servers on port 11211, and those servers answer the victim with responses up to 51,000 times larger. The victim never talks to the attacker. It just drowns in replies it never asked for.

This guide covers how Memcached amplification works, why it beat every other UDP vector by orders of magnitude, what the 1.35 Tbps attack on GitHub taught defenders, and the exact settings that keep your own servers from joining the next flood. The fix for exposed servers takes one flag. Why thousands still lack it is the more interesting part.

Key Takeaways

  • Memcached DDoS attacks abuse UDP on port 11211, where a spoofed request of a few bytes can trigger a reply up to 51,000 times larger (US-CERT TA14-017A).
  • On February 28, 2018, GitHub absorbed a Memcached amplification attack that peaked at 1.35 Tbps and 126.9 million packets per second.
  • Memcached 1.5.6, released on February 27, 2018, disabled UDP by default, but older installs keep it on until someone changes the config.
  • Rapid7 found 68,337 internet-exposed Memcached hosts, and roughly 47% of the ones it could fingerprint ran versions older than 1.5.6.
  • Targets need upstream filtering and scrubbing capacity, because no local firewall survives a terabit-scale flood on a 10 Gbps link.
  • Server owners stop the abuse at the source with three changes: start Memcached with -U 0, bind it to localhost or a private IP, and firewall port 11211.

What Memcached Is and Why Attackers Abuse It

Memcached is an open-source, in-memory key-value cache that stores database query results and other data in RAM so applications can read it in microseconds. Brad Fitzpatrick wrote it in 2003 for LiveJournal, and companies such as Facebook and Wikipedia later ran it at enormous scale.

The software was built for trusted internal networks. It has no authentication in its default configuration, and before version 1.5.6 it listened on both TCP and UDP port 11211. That design made sense inside a data center. Once servers were deployed on public cloud instances with open ports, it turned every exposed cache into a free traffic cannon.

Attackers do not need to break into the server. They only need it to answer. That is what makes Memcached a classic volumetric DDoS attack tool rather than an intrusion target.

Why UDP Port 11211 Became the Problem

UDP is connectionless. A server receiving a UDP packet has no handshake to confirm that the source IP address is real, so an attacker can forge the victim’s address and the server will reply to the victim. The same weakness drives every UDP flood attack and reflection technique, but Memcached added something extra: it can store values up to 1 MB by default and return many of them in a single response.

In February 2018, Kevin Liston of the SANS Internet Storm Center counted roughly 100,000 Memcached systems reachable from the internet, mostly in cloud provider address space. Each one was a potential reflector.

So how does a few-byte packet turn into a terabit of traffic? The mechanics are simpler than you might expect.

How a Memcached Amplification Attack Works Step by Step

A Memcached amplification attack works by planting large data on exposed servers, then asking those servers, with a forged return address, to send that data to the victim. The attacker spends almost no bandwidth, and the reflectors do the heavy lifting.

memcached amplification attack flow

  1. Scanning: The attacker scans the internet for hosts answering on UDP port 11211. Public search engines such as Shodan made this trivial in 2018.
  2. Seeding: The attacker uses the set command to store a large value, often close to the 1 MB default item limit, on each exposed server.
  3. Spoofing: The attacker sends a tiny get request for that key over UDP, with the source IP forged to match the victim.
  4. Reflection: Each Memcached server sends the full value back to the forged address, split into many UDP datagrams.
  5. Aggregation: Thousands of reflectors repeat this at once, and the combined replies saturate the victim’s links and devices.

Think of it like mailing postcards to thousands of libraries, each one signed with your neighbor’s address and asking for a full encyclopedia set. Every library complies. Your neighbor’s driveway fills with boxes, and none of them carry your name.

GitHub’s engineering team described the ratio plainly after its own incident:

“For each byte sent by the attacker, up to 51KB is sent toward the target.”

That ratio is the whole story. The next section shows how far ahead of other reflection vectors it sits.

Why Memcached Amplification Dwarfs Other UDP Attacks

Memcached amplification is larger than any other common UDP vector because the server can return a stored payload of up to 1 MB in answer to a request of a few bytes. Most other protocols return a fixed-size answer that the attacker cannot inflate.

On February 27, 2018, US-CERT updated its alert TA14-017A on UDP-based amplification and listed Memcache with a bandwidth amplification factor of 10,000 to 51,000. The previous leader in that table, NTP, sat at 556.9.

Memcached vs. NTP vs. DNS Amplification

Protocol UDP Port Amplification Factor (US-CERT) Why It Amplifies
Memcached 11211 10,000 to 51,000 Returns attacker-seeded values up to 1 MB
NTP 123 556.9 The monlist command returns up to 600 recent client addresses
CharGEN 19 358.8 Sends a stream of characters to any request
CLDAP 389 56 to 70 Directory queries return large records
DNS 53 28 to 54 ANY queries and large DNSSEC records
SSDP 1900 30.8 Device discovery replies list many services

If you have read our breakdowns of NTP amplification attacks and the DNS amplification attack, the pattern is the same. The difference is scale. An NTP reflector multiplies traffic by hundreds; a Memcached reflector multiplies it by tens of thousands.

Those record attacks are worth looking at closely, because they show how fast the damage arrives.

The Largest Memcached DDoS Attacks on Record

The two best-documented Memcached DDoS attacks happened within five days of each other in early 2018, and both broke the record for the largest DDoS attack publicly reported at the time.

GitHub, 1.35 Tbps in February 2018

According to GitHub’s incident report, the attack began at 17:21 UTC on February 28, 2018. Traffic peaked at 1.35 Tbps and 126.9 million packets per second, coming from more than 1,000 autonomous systems and tens of thousands of unique endpoints. GitHub.com was unavailable from 17:21 to 17:26 UTC and intermittently unavailable until 17:30 UTC.

GitHub recovered in about nine minutes because it moved traffic to an upstream DDoS mitigation provider by withdrawing its BGP announcements. A second spike of about 400 Gbps arrived shortly after 18:00 UTC and was absorbed without an outage.

The 1.7 Tbps Attack Five Days Later

On March 5, 2018, NETSCOUT Arbor confirmed a 1.7 Tbps Memcached reflection attack against a customer of a U.S.-based service provider. It used the same vector as the GitHub attack. The speed of the jump from 1.35 Tbps to 1.7 Tbps in less than a week showed how quickly attackers adopt a new reflector once it becomes public.

You might be thinking that these were headline attacks against giants, and that a smaller site would never see that volume. Yes, but the economics run the other way. A target with a 10 Gbps uplink needs less than 1% of GitHub’s peak to go dark.

What a Memcached DDoS Attack Does to Your Network

A Memcached DDoS attack exhausts bandwidth first, then overloads every device that has to process the flood, and ends in downtime for any service sharing the saturated links.

  • Bandwidth exhaustion: Reflected traffic fills upstream links before your firewall even sees it. Filtering on your own edge router does nothing once the pipe from your ISP is full.
  • Resource overload: Large responses arrive as many UDP datagrams and IP fragments. Firewalls, load balancers, and routers burn CPU and session-table memory reassembling or inspecting them.
  • Collateral damage: Every service behind the same link fails, including DNS, VPN, and email, not just the website that was targeted.
  • Cost spikes: Cloud egress and burstable transit plans bill for traffic volume, so an attack can raise invoices even after service is restored.

Early warning matters here. Many of the signs of a DDoS attack show up in flow data minutes before users notice, and the most telling signal for this vector is covered next.

How to Detect Memcached Amplification Traffic

The clearest marker of Memcached amplification traffic is a surge of inbound UDP packets with a source port of 11211. Legitimate internet traffic almost never arrives from that port, so it stands out quickly in NetFlow, sFlow, or IPFIX data.

Detection is harder than it sounds for one reason: every packet carries a real IP address of a real Memcached server. The spoofing happened on the request side, so the flood you receive is not spoofed at all. Blocking by source IP means blocking tens of thousands of legitimate-looking addresses spread across more than 1,000 networks.

  • Inbound UDP with source port 11211 above a baseline of near zero
  • A high share of fragmented IP packets with no matching outbound requests
  • Large UDP payloads close to 1,400 bytes, the maximum Memcached puts in one datagram
  • Thousands of distinct source IPs from cloud and hosting ASNs appearing within seconds

Configure a Flow-Monitoring Alert
Create a flow-monitoring alert for inbound UDP traffic with source port 11211 today, while traffic is quiet. Set the threshold to a few megabits per second, since legitimate internet traffic from that source port should be close to zero.

Detection tells you what is happening. Staying online requires capacity that sits in front of your network.

Memcached DDoS Mitigation That Keeps Services Online

Effective Memcached DDoS mitigation filters the flood upstream, before it reaches the links you own, and combines port-based filtering with enough distributed capacity to absorb terabit peaks.

Memcached DDOS protection layers

Filter UDP Source Port 11211 at the Edge

Because Memcached has no legitimate reason to send UDP traffic across the internet to most networks, dropping inbound UDP with source port 11211 is one of the cheapest and safest filters available. It removes the attack without touching normal web traffic.

Use Scrubbing and Anycast Capacity

A filter only helps if it runs somewhere with more capacity than the attack. An Anycast network spreads incoming traffic across many points of presence, so a 1.35 Tbps flood is split into smaller streams that individual sites can drop. For network and transport traffic, a Layer 4 shield filters TCP and UDP floods before they reach the origin.

Coordinate With Your ISP on Flowspec and Rate Limits

If you run your own network, BGP Flowspec lets you push a “drop UDP source port 11211” rule to your upstream provider in seconds rather than waiting on a support ticket. Agree on the rule format with your ISP before you need it.

For a wider view of the options, see these DDoS mitigation techniques, which apply to every reflection vector, not only Memcached.

All of this protects targets. The other half of the problem is the servers doing the reflecting, and some of them may be yours.

Memcached Server Security: Stop Your Server From Being Abused

To stop a Memcached server from being abused in DDoS attacks, disable UDP, bind the service to localhost or a private interface, and block port 11211 from the internet. These three changes close the reflector without affecting normal TCP cache traffic.

The Memcached project’s DDoS advisory recommends the same steps. Its 1.5.6 release notes, published on February 27, 2018, were blunt about the priority:

“This release primarily disables the UDP protocol by default.”

Memcached 1.5.6 Release Notes, Memcached Project (February 27, 2018)

  1. Upgrade: Run Memcached 1.5.6 or later. The UDP flaw is tracked as CVE-2018-1000115.
  2. Disable UDP explicitly: Add -U 0 to the start options, even on new versions, so a copied old config cannot turn it back on.
  3. Restrict the listen address: Use -l 127.0.0.1, or a private IP if other app servers need access.
  4. Firewall port 11211: Allow only your application servers on TCP 11211 and drop everything else, inbound and outbound.
  5. Verify: Restart the service and run netstat -plunt or ss -ulnp. Memcached should not appear on any UDP socket.

You might be thinking that UDP was enabled for a reason and that turning it off will slow the cache. For nearly every deployment, it will not. Mainstream client libraries talk to Memcached over TCP, and UDP support was mostly used by a handful of very large sites with custom clients.

# /etc/memcached.conf (Debian and Ubuntu) -U 0 -l 127.0.0.1 -p 11211 # Confirm no UDP listener remains sudo ss -ulnp | grep 11211

The Listen Address Misconception

Many administrators believe that -l 127.0.0.1 limits which clients can use the cache. It does not. As Kevin Liston noted in his SANS analysis, the flag only controls which network interfaces Memcached binds to. If you bind to a public interface and rely on the flag for access control, the server stays exposed. Firewall rules do the access control.

Reducing exposed services like this is part of shrinking your overall attack surface, and a few common mistakes keep that surface wider than teams realize.

Common Mistakes That Keep Memcached Servers Exposed

Most exposed Memcached servers today are not running new software with bad settings. They are old installs, cloned images, and forgotten test boxes.

  • Trusting the new default: Upgrading the package does not always replace an existing config file that still enables UDP.
  • Cloning old images: Golden images and container base layers built before 2018 bring the old defaults into new environments.
  • Open security groups: Cloud rules that allow 0.0.0.0/0 on all ports for “temporary testing” are a common source of exposure.
  • Ignoring outbound traffic: Without egress monitoring, a server can reflect attack traffic for weeks while the owner sees only a higher bandwidth bill.

Scan your own public IP ranges for UDP 11211 once a quarter with a tool such as Nmap (nmap -sU -p 11211). If you find an unexpected response, treat it as a security incident, not a routine cleanup task.

Even with these mistakes widely known, the question many teams ask is whether Memcached is still worth worrying about at all.

Are Memcached DDoS Attacks Still a Threat in 2026?

Yes, but the threat has changed shape. Memcached attacks are far less common than in 2018, because the 1.5.6 default, ISP filtering, and large-scale cleanup cut the reflector pool sharply. The vector is still available to anyone who scans for it.

Rapid7’s Project Sonar research found 68,337 exposed Memcached hosts. Of the 68,044 that returned a version, about 47% ran a release older than 1.5.6. That is roughly 32,000 servers with UDP on by default, years after the fix shipped.

Here is the contrarian part. Patching your own servers does nothing to protect you as a target. Each organization that closes UDP 11211 protects everyone else. Your own protection depends on upstream capacity, which is why attackers today often mix Memcached with other vectors and botnet DDoS attacks in a single campaign.

That split responsibility is the clearest way to plan your defenses.

Memcached DDoS Protection Checklist

Memcached DDoS protection has two owners: the team running Memcached, which must close the reflector, and the team running the public-facing service, which must absorb or filter the flood.

Action Who Owns It What It Prevents
Run Memcached 1.5.6+ with -U 0 Server and DevOps team Your server acting as a reflector
Bind to 127.0.0.1 or a private IP Server and DevOps team Direct internet access to the cache
Firewall TCP and UDP 11211 Network and cloud team Scanning, seeding, and abuse
Alert on inbound UDP source port 11211 Security operations Slow detection of an attack
Upstream filtering and scrubbing Network team and DDoS provider Link saturation and downtime
Anti-spoofing (BCP 38) on your networks ISPs and hosting providers Forged source addresses leaving your network

The last row matters more than it looks. BCP 38 (RFC 2827), published in May 2000, describes ingress filtering that stops spoofed packets from leaving a network. Without spoofing, reflection attacks of every kind stop working.

Final Thought on Memcached DDoS Attacks

Memcached DDoS attacks show how one default setting can turn useful infrastructure into a weapon. The 51,000x amplification factor came from a design meant for trusted networks, and it stayed dangerous because thousands of servers kept running with UDP on.

Two jobs keep you safe. Close the reflector on every server you own with UDP disabled, a private listen address, and a firewall on port 11211. Then make sure a flood aimed at you is filtered upstream, where the capacity exists to drop it, before it ever reaches your own links.

Common Questions About Memcached DDoS Attacks

Can a Memcached DDoS attack steal or expose my data?

No. A Memcached DDoS attack targets availability, not data. The flood is made of cache values the attacker stored on third-party servers. GitHub confirmed after its 2018 attack that the confidentiality and integrity of user data were never at risk.

How do I know if my Memcached server was used in an attack?

Look for unexpected outbound UDP traffic from port 11211, a sudden rise in egress bandwidth, or an abuse notice from your hosting or cloud provider. Then confirm with ss -ulnp whether Memcached is listening on UDP.

Does disabling UDP break Memcached for my application?

Almost never. Common client libraries for PHP, Python, Java, and Node.js connect over TCP by default. Only applications explicitly configured for the UDP protocol need changes, and those are rare.

Should Memcached ever be open to the internet?

No. Memcached should be reachable only from your application servers over a private network or localhost. If remote access is unavoidable, use firewall allowlists, and enable SASL authentication or TLS, which Memcached supports in recent versions.

Can a web application firewall stop a Memcached amplification attack?

Not on its own. A WAF inspects HTTP traffic at Layer 7, while Memcached floods are raw UDP packets that saturate links at Layer 3 and Layer 4. They need network-level filtering and upstream scrubbing capacity.