Skip to content
Smuggling / CRLF Write-up Advanced

Worldwide Serverside Cache Poisoning on All Akamai Edge Nodes ($50K+ Bounty Earned)

A hop-by-hop header abuse caused Akamai's proxies to desynchronise, allowing an attacker to smuggle a second request and poison the server-side cache for any Akamai-hosted domain, serving arbitrary content to other users in the same geographic area.

Francesco Mariani Follow

Published on medium.com

Bounty$50,000total stated by author View original

In March 2022, my friend Francesco Mariani and I were teaming up on a private Bug Bounty program organized by Whitejar to search for bugs on a website that was using Akamai CDN.

Jacopo Tediosi, 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. 9 min read.

Context

In March 2022, Francesco Mariani and Jacopo Tediosi were working together on a private bug bounty program run by Whitejar, hunting for bugs on a website that sat behind the Akamai CDN. The target host is referred to only as REDACTED throughout the write-up.

The Akamai WAF rules kept blocking the usual attack types, so the pair moved on to more esoteric payloads and started mixing them. That experimentation led to a vulnerability they describe as having "broken" half the web: an HTTP smuggling issue in Akamai's edge infrastructure that could be turned into worldwide server-side cache poisoning across Akamai Edge Nodes.

Setup

The work started from a private Whitejar program against a single Akamai-fronted host. The researchers used a VPN to check whether the desynchronisation was "open", meaning it affected responses served to IP addresses other than the ones they were attacking from. They also used bbscope to pull the link lists of all public programs on the popular bug bounty platforms, then filtered that list down to domains whose DNS pointed at Akamai.

Finding it

What caught their attention was an unusual "DNS Failure" response. It came back when they sent, twice, an HTTP/1.1 GET request to the host under test, with the Connection: Content-Length header, and with another GET request to www.example.com placed in the body.

The strange “DNS Failure” response From the original on medium.com

The screenshot shows the strange "DNS Failure" response. Odd behaviour like this is easy to overlook when you are testing many things at once, but this time they decided to dig deeper.

Exploitation

Step 1: Understand the hop-by-hop mechanics

Working out what was happening took a while, and required rereading Nathan Davison's article on hop-by-hop request headers. RFC 2068, Section 13.5.1 defines special headers named "hop-by-hop", which proxies remove before forwarding a request to the next proxy or to the destination. The Connection header lets a client name additional hop-by-hop headers beyond the default set.

By declaring Content-Length as hop-by-hop, the first Akamai proxy removed that header, which turned the request body into a second request. Akamai's second proxy then resolved the two requests separately. The first proxy received two responses where it expected one, so a desynchronisation occurred: the second response was queued and later sent in reply to requests from other clients. That is an HTTP smuggling vulnerability.

My attempt to graphically explain this complex security problem From the original on medium.com

The chart is the researchers' attempt to explain the architecture and the smuggling flow graphically.

Step 2: Explain the DNS failure

They still did not understand why a DNS error appeared and why www.example.com was not resolved. The answer was simple, and came from a co-worker's intuition: the Akamai proxy that routes requests appeared to resolve DNS only internally, within Akamai's own network.

To confirm it, they replaced www.example.com in the request body with www.akamai.com. The response was the Akamai homepage instead of the REDACTED homepage.

HTTP Smuggling at it’s finest: receiving www.akamai.com homepage when requesting www.redacted.com From the original on medium.com

The screenshot shows the Akamai homepage being returned when requesting www.redacted.com.

They also note that they chose the OPTIONS method for the first request, because it seemed more plausible to them that an OPTIONS request could carry a body than a GET request.

Step 3: Confirm the desynchronisation is open

Using a VPN, they verified that the desynchronisation was "open": it affected the responses given to IP addresses other than the ones they were attacking from.

Step 4: Move from one host to the whole CDN

Believing the bug might affect every Akamai customer worldwide, they switched their target from www.REDACTED.com to more popular sites. It worked on all of them. Sometimes the smuggled responses were server-side cached by Akamai Edge Nodes for the entire geographic area close to the IP that sent the malicious request. That allowed them to create new arbitrary content, semi-permanently depending on cache times, inside almost any domain served by Akamai.

As a proof of concept, they created the newly cached page demo.paypal.com/jacopotediosi_hackerone.js for the whole Italian area, containing the content of www.sky.com/robots.txt. Sky was used because it is another Akamai customer and the researchers did not own a host on the Akamai network to publish their arbitrary content from.

The demo uses different IPs and browsers to rule out local caches.

Root cause

The flaw is in how Akamai's proxy chain handled the Connection header. Because Content-Length was accepted as a hop-by-hop header name, the first proxy stripped it and treated the body as a second request, while the second proxy parsed the two requests independently. The two proxies disagreed about where one request ended and the next began, which is the classic request smuggling desynchronisation. The DNS behaviour showed that the second proxy resolved the smuggled request's host internally, inside Akamai's network.

The problem only appears in the disagreement between the two proxies.

Impact

An attacker could smuggle a second request through Akamai's proxy chain and have the smuggled response queued and served to other clients. Because the smuggled responses were sometimes cached server-side by Akamai Edge Nodes for the whole geographic area near the attacker's IP, the attacker could create arbitrary content, semi-permanently depending on cache times, within almost any domain served by Akamai. The researchers demonstrated this by publishing content under demo.paypal.com for the Italian area.

The impact depends on cache times. Believing the bug might affect all Akamai customers worldwide, they tested popular sites beyond the original target.

Fix

Akamai deployed a silent fix on 02/04/2022, after which the researchers' payloads triggered 403 responses. On 06/04/2022 Akamai informed them of the silent fix, and on 05/10/2022 Akamai published an official advisory on the incident.

The fix consists of rules that prevent specifying the Content-Length keyword within the Connection header value. The researchers are not sure there are no bypasses or other unexpected similar ways to split requests, and they note that the underlying problem remains in the HTTP core implementation.

Akamai applied some validations on the requests, but the underlying problem remains in the HTTP core implementation From the original on medium.com

The screenshot shows Akamai's validations on the requests, with the underlying HTTP core issue still present.

Variants to test

  • A positive result is a response that does not match the request, or a second response arriving for a request you did not send.
  • A positive result is the same desynchronisation with a method the target accepts.
  • A positive result is content from an internal or unrelated host appearing in the response.
  • A positive result is the same poisoned content served to other clients in the region.
  • Look for bypasses of the Connection: Content-Length block that Akamai applied, since the researchers were not sure the validation is complete. A positive result is a payload that still splits the request despite the rule.
  • Test other implementations besides Akamai, which the researchers had not had time to examine. A positive result is the same desynchronisation on a different proxy or CDN.

Timeline

  • 21/03/2022: first analysis of the "DNS failure" behaviour.
  • 22/03/2022: fully functional PoC built for Whitejar's private program.
  • 23/03/2022: confirmed the PoC worked for any Akamai Edge Node.
  • 24/03/2022, 19:33 CEST: first email to [redacted]
  • 25/03/2022, 19:16 CEST: first response from an Akamai security architect.
  • 25/03/2022, 20:29 CEST: Akamai confirmed the vulnerability and said it has no bug bounty program.
  • 25/03/2022, 23:00 CEST until 01/04/2022, 23:30 CEST: most tickets opened on bug bounty platforms.
  • 26/03/2022, 02:00 CEST: Valve (Steam) confirmed reproduction.
  • 28/03/2022, 07:40 CEST: Zomato asked for an India-region cache poison as PoC and confirmed the vulnerability minutes later.
  • 28/03/2022, 21:35 CEST: Airbnb confirmed reproduction.
  • 29/03/2022, 19:07 CEST: Airbnb applied a workaround fix and requested a retest.
  • 02/04/2022: Akamai deployed a silent fix; payloads then triggered 403 responses. The researchers closed the H1 tickets of eToro BBP, BMW Group and Rockstar Games to prevent them being reported as N/A.
  • 06/04/2022: Akamai informed them of the silent fix.
  • 07/04/2022: agreement with Akamai on public disclosure.
  • 27/04/2022: PayPal confirmed the H1 report and rewarded them.
  • 18/05/2022: most bounties received.
  • 17/09/2022: Francesco published his blog post on Hacktive Security Blog.
  • 29/09/2022: publication of this article on Medium.
  • 03/10/2022: publication on Whitejar Blog.
  • 04/10/2022: publication on The Daily Swig and The Stack, and featured on Security Now #891 "Poisoning Akamai".
  • 05/10/2022: Akamai issued its official advisory.

Reporting and bounties

Akamai has no bug bounty program, Hall of Fame, swag giveaways or anything similar, which the researchers discovered quickly.

Akamai validating the vulnerability From the original on medium.com

The screenshot shows Akamai validating the vulnerability.

While Akamai was patching, the researchers raced against time asking individual Akamai customers for bounties. Their reasoning is that those who use a framework, plugin or CDN assume both its benefits and its risks, and that without their work the vulnerability would still be there.

To find candidate programs, they used bbscope to extract links for all public programs on the most popular bug bounty platforms, then ran a short bash script to keep only domains whose DNS pointed to Akamai:

Bash
while read line; do    count=$(dig $line | grep "akamai" 2>/dev/null)        if [[ -n $count ]]        then            echo "Found: " $line        fidone <$1

Results by program:

Program Outcome
Whitejar €5,000 for their private program
Bugcrowd (Tesla.com) closed as "duplicated" of an unrelated ticket
Bugcrowd (LastPass.com) closed as "not applicable", unable to reproduce
Intigriti (Brussels Airlines) closed as "duplicated"; told the airline was "already aware of any request smuggle vulnerabilities in their web assets"
Intigriti (Mastercard) closed without further information
HackerOne (Starbucks) replied the vulnerability was not, in their opinion, a major security issue
HackerOne (PlayStation) staff failed to reproduce, even after a new page was created under www.playstation.com
HackerOne (Marriott) cache issues temporarily out-of-scope
PayPal $25,200
Airbnb $14,875
Hyatt Hotels $4,000
Valve (Steam) $750
Zomato $450
Goldman Sachs $100

On Bugcrowd, the triager did not know how to use Burp Suite and said that "sending an OPTIONS request to any URI, they received 400 Bad Request", not realising they were sending the request to the target of the report they had probably read before.

Sam from Bugcrowd doesn’t know how to use Burp Suite From the original on medium.com

The screenshot shows the Bugcrowd triager's Burp Suite mistake.

Airbnb handled the situation outstandingly, applying custom rules on Akamai's WAF in less than 24 hours to block requests containing Connection: Content-Length, even before Akamai's official fix. PayPal confirmed the report and issued a bounty long after Akamai's fix, so the researchers do not know whether PayPal ever saw the vulnerability working or trusted the PoC video.

Microsoft and Apple acknowledged the reports after Akamai had already deployed the fix, and thanked the researchers by private email.

Call for research

This was the first time the researchers had seen hop-by-hop headers used for smuggling this way. A Reddit user, mdulin2, later reported that the payload had already appeared in Martin Doyhenard's "Response Smuggling: Pwning HTTP/1.1 Connections" presentation at DEFCON29.

Or watch on YouTube
From the original on medium.com

They had not had time to check whether implementations other than Akamai suffer from the issue, and they are not sure Akamai's validation has no bypasses or other unexpected ways to split requests.

Related resources

Francesco's version of the blog post is on the Hacktive Security Blog.

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

What happened, in plain words

In March 2022, two security researchers, Francesco Mariani and Jacopo Tediosi, were testing a website for security problems. The website was part of a private bug bounty program run by a company called Whitejar. A bug bounty program is a scheme where a company pays people to find security holes in its systems and report them privately, instead of exploiting them. The website they were testing sat behind a service called Akamai.

Akamai is a content delivery network, usually shortened to CDN. A CDN is a worldwide network of servers that sit between visitors and a website. When you open a website, your request often does not go straight to the website's own server. It goes to a CDN server near you, called an edge node, which either answers from its own copy or passes the request on. This makes websites faster and lets the CDN filter out malicious traffic. Akamai is one of the largest CDNs in the world, and a very large number of well-known websites use it.

The researchers found a flaw in how Akamai's servers handled a particular kind of web request. By crafting a request in an unusual way, they could make Akamai's own servers disagree with each other about where one request ended and the next began. The result was that a second, hidden request slipped through and its answer was sometimes stored in Akamai's cache. A cache is a temporary store of answers kept so they can be served again quickly. Because the cache is shared, the stored answer could then be handed to other visitors in the geographic area near the attacker's IP, for almost any domain served by Akamai. The researchers describe this as having "broken" half the web.

This article walks through the whole story from zero: what the researchers were doing, what they sent, why each step was taken, what the companies involved said, and what happened afterwards. No prior security knowledge is assumed.

Context

In March 2022, Francesco Mariani and Jacopo Tediosi were working together on a private bug bounty program run by Whitejar, hunting for bugs on a website that sat behind the Akamai CDN. The target host is referred to only as REDACTED throughout the write-up, meaning the researchers are not naming the actual website.

The Akamai WAF rules kept blocking the usual attack types, so the pair moved on to more esoteric payloads and started mixing them. A WAF, or web application firewall, is a filter that inspects incoming requests and blocks ones that look like known attacks. A payload, in this context, is the crafted piece of a request that is meant to trigger a bug. Because the standard tricks were being blocked, the researchers tried stranger combinations, and that experimentation led to a vulnerability they describe as having "broken" half the web: an HTTP smuggling issue in Akamai's edge infrastructure that could be turned into worldwide server-side cache poisoning across Akamai Edge Nodes.

Two of those terms need unpacking straight away.

HTTP is the language browsers and servers use to talk to each other. Every time you load a page, your browser sends an HTTP request and the server sends back an HTTP response. A request has a first line (the method, such as GET, and the address), then a set of headers (extra information in the form Name: value), then optionally a body (the content being sent).

Smuggling, in this context, means hiding a second request inside the first one so that one of the servers in the chain sees two requests where another sees only one. Cache poisoning means getting a wrong or attacker-chosen answer stored in a shared cache, so that other people receive it later. Server-side means the cache lives on the server side, not in your own browser, so it affects everyone, not just the person who sent the request.

Setup

The work started from a private Whitejar program against a single Akamai-fronted host. The researchers used a VPN to check whether the desynchronisation was "open", meaning it affected responses served to IP addresses other than the ones they were attacking from. A VPN is a service that routes your internet traffic through a server elsewhere, so your traffic appears to come from a different IP address. An IP address is the numeric address that identifies a device on a network. Desynchronisation means two parties in a conversation no longer agree on the state of that conversation, for example on how many requests have been sent and how many answers are still owed.

They also used bbscope to pull the link lists of all public programs on the popular bug bounty platforms, then filtered that list down to domains whose DNS pointed at Akamai. DNS, the Domain Name System, is the internet's address book: it turns a name like example.com into the IP address of a server. If a domain's DNS answer points at Akamai, that domain is served through Akamai, and is therefore a candidate for the same bug.

Finding it

What caught their attention was an unusual "DNS Failure" response. It came back when they sent, twice, an HTTP/1.1 GET request to the host under test, with the Connection: Content-Length header, and with another GET request to www.example.com placed in the body.

The strange “DNS Failure” response From the original on medium.com

The screenshot shows the strange "DNS Failure" response. Odd behaviour like this is easy to overlook when you are testing many things at once, but this time they decided to dig deeper.

To unpack the request they sent, piece by piece:

  • HTTP/1.1 is a version of the HTTP protocol. In HTTP/1.1, a connection between a client and a server can carry several requests one after another, and each side has to know exactly where one request ends and the next begins.
  • GET is the method a browser uses to ask for a page or a file. It is the most common method on the web.
  • The Connection header is a normal HTTP header that tells the other side something about the connection itself, for example whether it should stay open after this request.
  • Content-Length is a normal HTTP header that says how many bytes long the body of the request is. It is how the receiving server knows where the body stops.
  • Putting Content-Length as the value of the Connection header is unusual. It is the heart of the trick.
  • The body of the request was itself another GET request, this time addressed to www.example.com. www.example.com is a standard example domain reserved for documentation, so it is a safe name to use in tests.

Sending a request whose body is another request is not something a browser ever does. It is exactly the kind of strange construction that can expose a disagreement between servers.

Exploitation

Step 1: Understand the hop-by-hop mechanics

Working out what was happening took a while, and required rereading Nathan Davison's article on hop-by-hop request headers. RFC 2068, Section 13.5.1 defines special headers named "hop-by-hop", which proxies remove before forwarding a request to the next proxy or to the destination. A proxy is a server that sits in the middle and passes requests along. RFC 2068 is one of the official documents that describe how HTTP works, and Section 13.5.1 is the part that lists these special headers.

The idea of hop-by-hop is easiest to grasp with an everyday comparison. Imagine a parcel being passed along a chain of couriers. Some instructions on the label are meant only for the next courier, such as "hand this to the next driver in person". That courier follows the instruction and then removes it before passing the parcel on, because the next courier does not need it. Hop-by-hop headers work the same way: they are instructions for one hop only, and each proxy strips them before forwarding.

The Connection header lets a client name additional hop-by-hop headers beyond the default set. In other words, it is a way of saying "treat this header like the courier instruction: use it for this hop, then remove it".

By declaring Content-Length as hop-by-hop, the first Akamai proxy removed that header, which turned the request body into a second request. This is the crucial step. Content-Length is normally what tells a server where the body ends. If a proxy removes it, the next server in the chain has to work out the boundaries some other way, and in this case it decided that the body was in fact a new request. Akamai's second proxy then resolved the two requests separately. The first proxy received two responses where it expected one, so a desynchronisation occurred: the second response was queued and later sent in reply to requests from other clients. That is an HTTP smuggling vulnerability.

My attempt to graphically explain this complex security problem From the original on medium.com

The chart is the researchers' attempt to explain the architecture and the smuggling flow graphically.

Step 2: Explain the DNS failure

They still did not understand why a DNS error appeared and why www.example.com was not resolved. The answer was simple, and came from a co-worker's intuition: the Akamai proxy that routes requests appeared to resolve DNS only internally, within Akamai's own network.

To confirm it, they replaced www.example.com in the request body with www.akamai.com. The response was the Akamai homepage instead of the REDACTED homepage.

HTTP Smuggling at it’s finest: receiving www.akamai.com homepage when requesting www.redacted.com From the original on medium.com

The screenshot shows the Akamai homepage being returned when requesting www.redacted.com.

This is a striking result. The researchers asked for the REDACTED website, and the answer they got back was Akamai's own homepage. It means the hidden request inside the body was being handled by Akamai's internal systems, which appeared to resolve DNS only within Akamai's own network. That is why the earlier attempt with www.example.com produced a DNS failure: the internal resolver had no idea what www.example.com was.

They also note that they chose the OPTIONS method for the first request, because it seemed more plausible to them that an OPTIONS request could carry a body than a GET request. OPTIONS is another HTTP method, normally used to ask a server which methods and features it supports. In everyday web traffic, GET requests almost never have a body, so a server might be more suspicious of one. The researchers judged OPTIONS a more believable carrier for their hidden request than GET.

Step 3: Confirm the desynchronisation is open

Using a VPN, they verified that the desynchronisation was "open": it affected the responses given to IP addresses other than the ones they were attacking from. This matters enormously. If the effect only appeared for the attacker's own connection, it would be a curiosity. If it appears for other people's connections, then real visitors can receive the smuggled answer, and the bug has real impact.

Step 4: Move from one host to the whole CDN

Believing the bug might affect every Akamai customer worldwide, they switched their target from www.REDACTED.com to more popular sites. It worked on all of them. Sometimes the smuggled responses were server-side cached by Akamai Edge Nodes for the entire geographic area close to the IP that sent the malicious request. That allowed them to create new arbitrary content, semi-permanently depending on cache times, inside almost any domain served by Akamai.

An edge node is a CDN server placed close to users, so answers can be delivered quickly. When an edge node caches an answer, it keeps it for a period called the cache time, and serves it to everyone who asks for the same thing until that time runs out. If an attacker can get their own content into that cache, every visitor in the region gets the attacker's content instead of the real page, until the cache expires. That is why the researchers call the effect semi-permanent: it lasts as long as the cache does.

As a proof of concept, they created the newly cached page demo.paypal.com/jacopotediosi_hackerone.js for the whole Italian area, containing the content of www.sky.com/robots.txt. A proof of concept is a small demonstration that shows a bug is real and shows its effect, without causing harm. Sky was used because it is another Akamai customer and the researchers did not own a host on the Akamai network to publish their arbitrary content from. In other words, they needed some harmless text to place into the poisoned page, and they borrowed it from a site that was also behind Akamai.

The demo uses different IPs and browsers to rule out local caches. A local cache is a copy stored on your own machine, for example by your browser. If the researchers had seen the fake page only in their own browser, it might have been their own machine remembering it. By checking from different IP addresses and different browsers, they showed the fake page was coming from Akamai's shared cache, not from their own devices.

Root cause

The flaw is in how Akamai's proxy chain handled the Connection header. Because Content-Length was accepted as a hop-by-hop header name, the first proxy stripped it and treated the body as a second request, while the second proxy parsed the two requests independently. The two proxies disagreed about where one request ended and the next began, which is the classic request smuggling desynchronisation. The DNS behaviour showed that the second proxy resolved the smuggled request's host internally, inside Akamai's network.

The problem only appears in the disagreement between the two proxies.

Impact

An attacker could smuggle a second request through Akamai's proxy chain and have the smuggled response queued and served to other clients. Because the smuggled responses were sometimes cached server-side by Akamai Edge Nodes for the whole geographic area near the attacker's IP, the attacker could create arbitrary content, semi-permanently depending on cache times, within almost any domain served by Akamai. The researchers demonstrated this by publishing content under demo.paypal.com for the Italian area.

The impact depends on cache times. Believing the bug might affect all Akamai customers worldwide, they tested popular sites beyond the original target.

Fix

Akamai deployed a silent fix on 02/04/2022, after which the researchers' payloads triggered 403 responses. A 403 response is the standard HTTP answer meaning "forbidden": the server understood the request but refused to carry it out. On 06/04/2022 Akamai informed them of the silent fix, and on 05/10/2022 Akamai published an official advisory on the incident. An advisory is a public notice describing a security issue and what was done about it.

The fix consists of rules that prevent specifying the Content-Length keyword within the Connection header value. The researchers are not sure there are no bypasses or other unexpected similar ways to split requests, and they note that the underlying problem remains in the HTTP core implementation. A bypass is a way of achieving the same effect while avoiding the new rule, for example by writing the same header in a slightly different form. Saying the problem remains in the HTTP core implementation means the fix is a filter on top, not a change to the fundamental way the software parses HTTP.

Akamai applied some validations on the requests, but the underlying problem remains in the HTTP core implementation From the original on medium.com

The screenshot shows Akamai's validations on the requests, with the underlying HTTP core issue still present.

Variants to test

These are the follow-up directions the researchers suggest, each with the reason for trying it and what a positive result would look like.

  • A positive result is a response that does not match the request, or a second response arriving for a request you did not send.
  • A positive result is the same desynchronisation with a method the target accepts.
  • A positive result is content from an internal or unrelated host appearing in the response.
  • A positive result is the same poisoned content served to other clients in the region.
  • Look for bypasses of the Connection: Content-Length block that Akamai applied, since the researchers were not sure the validation is complete. A positive result is a payload that still splits the request despite the rule.
  • Test other implementations besides Akamai, which the researchers had not had time to examine. A positive result is the same desynchronisation on a different proxy or CDN.

Timeline

  • 21/03/2022: first analysis of the "DNS failure" behaviour.
  • 22/03/2022: fully functional PoC built for Whitejar's private program.
  • 23/03/2022: confirmed the PoC worked for any Akamai Edge Node.
  • 24/03/2022, 19:33 CEST: first email to [redacted]
  • 25/03/2022, 19:16 CEST: first response from an Akamai security architect.
  • 25/03/2022, 20:29 CEST: Akamai confirmed the vulnerability and said it has no bug bounty program.
  • 25/03/2022, 23:00 CEST until 01/04/2022, 23:30 CEST: most tickets opened on bug bounty platforms.
  • 26/03/2022, 02:00 CEST: Valve (Steam) confirmed reproduction.
  • 28/03/2022, 07:40 CEST: Zomato asked for an India-region cache poison as PoC and confirmed the vulnerability minutes later.
  • 28/03/2022, 21:35 CEST: Airbnb confirmed reproduction.
  • 29/03/2022, 19:07 CEST: Airbnb applied a workaround fix and requested a retest.
  • 02/04/2022: Akamai deployed a silent fix; payloads then triggered 403 responses. The researchers closed the H1 tickets of eToro BBP, BMW Group and Rockstar Games to prevent them being reported as N/A. H1 is HackerOne, a bug bounty platform. N/A means not applicable, a status that closes a report without a reward.
  • 06/04/2022: Akamai informed them of the silent fix.
  • 07/04/2022: agreement with Akamai on public disclosure. Public disclosure is making the details of a fixed vulnerability public so others can learn from it.
  • 27/04/2022: PayPal confirmed the H1 report and rewarded them.
  • 18/05/2022: most bounties received.
  • 17/09/2022: Francesco published his blog post on Hacktive Security Blog.
  • 29/09/2022: publication of this article on Medium.
  • 03/10/2022: publication on Whitejar Blog.
  • 04/10/2022: publication on The Daily Swig and The Stack, and featured on Security Now #891 "Poisoning Akamai".
  • 05/10/2022: Akamai issued its official advisory.

Reporting and bounties

Akamai has no bug bounty program, Hall of Fame, swag giveaways or anything similar, which the researchers discovered quickly. A Hall of Fame is a public page listing researchers who have reported bugs. Swag is branded merchandise given as a thank-you.

Akamai validating the vulnerability From the original on medium.com

The screenshot shows Akamai validating the vulnerability.

While Akamai was patching, the researchers raced against time asking individual Akamai customers for bounties. Their reasoning is that those who use a framework, plugin or CDN assume both its benefits and its risks, and that without their work the vulnerability would still be there. A framework is a reusable set of code a developer builds on; a plugin is an add-on that extends another piece of software. The point is that a customer who chooses to put their site behind a CDN gets the CDN's speed and protection, and with them the CDN's problems.

To find candidate programs, they used bbscope to extract links for all public programs on the most popular bug bounty platforms, then ran a short bash script to keep only domains whose DNS pointed at Akamai:

Bash
while read line; do    count=$(dig $line | grep "akamai" 2>/dev/null)        if [[ -n $count ]]        then            echo "Found: " $line        fidone <$1

Line by line, in plain words:

  • while read line; do starts a loop that reads the input file one line at a time, putting each line into a variable called line. Each line is a domain name from the bbscope list.
  • count=$(dig $line | grep "akamai" 2>/dev/null) runs the dig command on that domain. dig is a command-line tool that asks DNS what a name resolves to. The output is piped into grep "akamai", which keeps only the lines containing the word akamai. The result is stored in count. The 2>/dev/null part throws away error messages so they do not clutter the output.
  • if [[ -n $count ]] checks whether count is non-empty, meaning the DNS answer mentioned Akamai.
  • then begins what to do in that case.
  • echo "Found: " $line prints the domain name, so the researcher sees it in the list of candidates.
  • fi closes the if.
  • done <$1 closes the loop and feeds it from the file named by the first argument given to the script.

In short, the script answers one question for every domain: does this domain's DNS point at Akamai? If yes, it is worth testing.

Results by program:

Program Outcome
Whitejar €5,000 for their private program
Bugcrowd (Tesla.com) closed as "duplicated" of an unrelated ticket
Bugcrowd (LastPass.com) closed as "not applicable", unable to reproduce
Intigriti (Brussels Airlines) closed as "duplicated"; told the airline was "already aware of any request smuggle vulnerabilities in their web assets"
Intigriti (Mastercard) closed without further information
HackerOne (Starbucks) replied the vulnerability was not, in their opinion, a major security issue
HackerOne (PlayStation) staff failed to reproduce, even after a new page was created under www.playstation.com
HackerOne (Marriott) cache issues temporarily out-of-scope
PayPal $25,200
Airbnb $14,875
Hyatt Hotels $4,000
Valve (Steam) $750
Zomato $450
Goldman Sachs $100

A triager is the person at a bug bounty platform who first reads a report and decides what to do with it. On Bugcrowd, the triager did not know how to use Burp Suite and said that "sending an OPTIONS request to any URI, they received 400 Bad Request", not realising they were sending the request to the target of the report they had probably read before. Burp Suite is a widely used tool for inspecting and modifying web traffic. A 400 Bad Request response means the server could not understand the request at all. The point of the anecdote is that the triager tested the wrong site, got a meaningless error, and concluded the bug was not there.

Sam from Bugcrowd doesn’t know how to use Burp Suite From the original on medium.com

The screenshot shows the Bugcrowd triager's Burp Suite mistake.

Airbnb handled the situation outstandingly, applying custom rules on Akamai's WAF in less than 24 hours to block requests containing Connection: Content-Length, even before Akamai's official fix. PayPal confirmed the report and issued a bounty long after Akamai's fix, so the researchers do not know whether PayPal ever saw the vulnerability working or trusted the PoC video.

Microsoft and Apple acknowledged the reports after Akamai had already deployed the fix, and thanked the researchers by private email.

Call for research

This was the first time the researchers had seen hop-by-hop headers used for smuggling this way. A Reddit user, mdulin2, later reported that the payload had already appeared in Martin Doyhenard's "Response Smuggling: Pwning HTTP/1.1 Connections" presentation at DEFCON29. DEFCON is a long-running security conference, and a presentation there is a talk given to an audience of security professionals.

Or watch on YouTube
From the original on medium.com

They had not had time to check whether implementations other than Akamai suffer from the issue, and they are not sure Akamai's validation has no bypasses or other unexpected ways to split requests.

Related resources

Francesco's version of the blog post is on the Hacktive Security Blog.

Glossary

  • Advisory: a public notice from a company describing a security issue and what was done about it.
  • Akamai: a large content delivery network (CDN) whose servers sit between visitors and many websites.
  • Body: the optional content of an HTTP request or response, after the headers.
  • Bug bounty program: a scheme where a company pays people to find and privately report security holes.
  • Burp Suite: a tool for inspecting and modifying web traffic, widely used in security testing.
  • Bypass: a way of achieving the same effect while avoiding a defence that was put in place.
  • Cache: a temporary store of answers kept so they can be served again quickly.
  • Cache poisoning: getting an attacker-chosen answer stored in a shared cache so other people receive it.
  • Cache time: how long a cached answer is kept before it is fetched again.
  • CDN (content delivery network): a worldwide network of servers that sit between visitors and a website to make it faster and to filter traffic.
  • Connection header: an HTTP header carrying instructions about the connection itself, including which headers are hop-by-hop.
  • Content-Length: an HTTP header stating how many bytes long the body is.
  • DEFCON: a long-running security conference where researchers present their work.
  • Desynchronisation: a state where two parties in a conversation disagree about what has been sent and what is still owed.
  • DNS (Domain Name System): the internet's address book, turning names into IP addresses.
  • Edge node: a CDN server placed close to users so answers can be delivered quickly.
  • Framework: a reusable set of code that developers build on.
  • GET: the HTTP method used to ask for a page or file.
  • Hall of Fame: a public page listing researchers who have reported bugs.
  • Header: extra information in an HTTP message, written as Name: value.
  • Hop-by-hop header: a header meant for one step of the chain only, removed by each proxy before forwarding.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • HTTP/1.1: a version of HTTP in which one connection can carry several requests in sequence.
  • HTTP smuggling: hiding a second request inside the first so different servers in the chain see different numbers of requests.
  • IP address: the numeric address identifying a device on a network.
  • N/A (not applicable): a status that closes a bug report without a reward.
  • OPTIONS: an HTTP method normally used to ask a server which methods and features it supports.
  • Payload: the crafted part of a request meant to trigger a bug.
  • Plugin: an add-on that extends another piece of software.
  • Proof of concept (PoC): a small demonstration showing a bug is real and what it can do.
  • Proxy: a server that sits in the middle and passes requests along.
  • Public disclosure: making the details of a fixed vulnerability public so others can learn from it.
  • RFC 2068: an official document describing how HTTP works; Section 13.5.1 lists the hop-by-hop headers.
  • Server-side: happening on the server, not in the visitor's own browser.
  • Swag: branded merchandise given as a thank-you.
  • Triager: the person at a bug bounty platform who first reads a report and decides what to do with it.
  • VPN: a service that routes your traffic through a server elsewhere so it appears to come from a different IP address.
  • WAF (web application firewall): a filter that inspects incoming requests and blocks ones that look like known attacks.
  • 403: the HTTP response meaning "forbidden": the request was understood but refused.
  • 400 Bad Request: the HTTP response meaning the server could not understand the request at all.

More by Francesco Mariani

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.