Skip to content
Cache bugs Write-up Beginner

Apple Hall Of Fame for a Small Misconfiguration || Unauth Cache Purging

The report describes an unauthenticated cache purge vulnerability where any user can send a PURGE request to delete cached resources. This could lead to increased bandwidth costs and degraded application performance.

Prajit Sindhkar Follow

Published on sapt.medium.com

Hello guys๐Ÿ‘‹๐Ÿ‘‹ ,Prajit here from the BUG XS Team , recently I got acknowledgement for reporting a valid issue on Apple Program. So that bug is called Unauth Cache Purging.

Prajit Sindhkar, on sapt.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. 4 min read.

Context

This write-up covers an unauthenticated cache purge issue reported against Apple's bug bounty programme, which earned the researcher an acknowledgement for a valid issue. The report itself is written as a teaching piece: it explains what caches are, what a cache purge request does, and then shows how to check whether a host lets anonymous users purge its cache.

A cache is a temporary storage location that keeps copies of data or files so they can be served faster. When you visit a site for the first time, the browser loads images, fonts and other files from the server, and copies of that content are also kept locally. On a later visit the browser can take the content from the cache instead of asking the server again, which reduces traffic on both the server and the client side and makes the site load faster.

Cache Working Visual Representation-1 From the original on sapt.medium.com

Cache Working Visual Representation-1

Cache Working Visual Representation-2 From the original on sapt.medium.com

Cache Working Visual Representation-2

A cache purge request is the opposite operation: it deletes the stored cache. After a purge, the next visit to the site causes the page to be generated by pulling information from the database again, the original method, and the page is then copied back into a new cache. The purge request therefore exists to let a user delete any cached resource, and the vulnerability appears when that ability is not restricted to authenticated users.

Setup

The report describes no accounts, roles, tool versions or other preconditions. The only tool used is curl, and the check is performed directly against a target host.

Finding it

The reasoning is straightforward. If the purge request is available to any user, even those who are not authenticated, then those users can delete or invalidate the caches stored for a given resource.

Exploitation

Step 1: send a PURGE request

The check is a single curl invocation using the PURGE HTTP method against the target:

Bash
curl -X PURGE https://target.com

-X PURGE tells curl to use PURGE as the request method instead of GET. The method is the whole test: no body, headers or authentication are supplied, so whatever the server answers reflects how it treats an anonymous purge request.

Step 2: read the response

If the host is vulnerable, the response looks like this:

Vulnerable From the original on sapt.medium.com

Vulnerable

If the host is not vulnerable, the response looks like this:

Not Vulnerable From the original on sapt.medium.com

Not Vulnerable

The report shows the two responses as screenshots and does not spell out the status codes or bodies in text, so the distinction is made visually rather than by a documented status line.

Root cause

The mistake is in how the cache purge endpoint is authorised: the purge request is accepted from any user, including unauthenticated ones, instead of being restricted to authenticated users or disallowed entirely. The report does not describe the server or cache software involved, so the exact configuration that exposes the method is not stated. The report does not describe the configuration that allows an anonymous purge request.

Impact

Because an anonymous user can delete or invalidate the caches stored for a resource, the report lists two consequences: increased bandwidth costs and degraded application performance. Allowing anonymous users to purge cache could be used to maliciously degrade performance, for example by forcing the origin to regenerate pages that would otherwise have been served from cache. The report does not quantify the effect, name affected endpoints beyond the target host, or describe any data exposure; the impact it describes is availability and cost, not confidentiality or integrity.

Fix

The mitigation given in the report is to disallow cache purge requests or to limit them to authenticated users only.

Variants to test

  1. Send PURGE to other hosts and paths on the same estate, including static asset paths and API routes. A positive result is a response that indicates the cached object was removed rather than rejected.
  2. Try the purge against a resource you can observe, then request it again and look for a cache miss or a slower origin-generated response. A positive result is a cache that was populated before the purge and is regenerated afterwards.
  3. Repeat the request with no cookies or authorisation headers at all, as in the original check, and compare with an authenticated request. A positive result is that both are accepted, showing the check is missing rather than merely weak.
  4. Test other cache-management methods that some servers expose, such as PURGE on individual URLs versus a wildcard purge. A positive result is any anonymous request that invalidates more than the single resource it names.

The reference the report points to for further reading is the HackerOne report at https://hackerone.com/reports/154278.

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

What happened, in plain words

A security researcher reported an unauthenticated cache purge issue to Apple's bug bounty programme. The cache is the website's short-term memory that makes pages load faster. Being able to clear it without permission is a small configuration mistake, but it can be used to slow the site down and increase its costs. The researcher reported it and Apple acknowledged it as a valid issue. This article explains, from scratch, what a cache is, what a cache purge request is, and how to check whether a site has this problem.

What is a cache?

A cache is a temporary storage place that keeps copies of data or files so they can be used faster. It saves data for software applications, servers and web browsers, so users do not have to download the same information every time they visit a website or use an application.

Think of it like a kitchen counter. Instead of walking to the pantry every time you need salt, you keep a small bowl of salt on the counter. Getting salt from the counter is much faster than going to the pantry.

When you visit a website for the first time, your browser loads images, fonts and other files from the server. That takes time and uses bandwidth. To avoid repeating that work on every visit, the browser (and often the server) keeps copies of those files. The next time you visit, the browser can use the copy from the cache instead of asking the server again. This reduces traffic on both the server and the client side, and the website loads much faster.

Cache Working Visual Representation-1 From the original on sapt.medium.com

Cache Working Visual Representation-1

Cache Working Visual Representation-2 From the original on sapt.medium.com

Cache Working Visual Representation-2

What is a cache purge request?

A cache purge request is the opposite of caching: it deletes the stored cache. After a purge, the next time you visit the website, the page is generated by pulling information from the database again (the original method), and then the page is copied back into a new cache.

The cache purge request simply allows users to delete any cached resource. In a normal, secure setup, this ability should be limited to authenticated users, because deleting the cache forces the server to work harder and can slow the site down for everyone.

The vulnerability: unauthenticated cache purge

If the purge request is available to any user, even those who are not authenticated (not logged in), they can delete or invalidate the caches stored for a certain resource. This can lead to increased bandwidth costs and degraded application performance. Allowing anonymous users to purge the cache could be used to maliciously degrade performance.

In other words, the website forgot to check whether the person sending the purge request had permission to do so. It is like a building where anyone can press the fire alarm reset button, not just the fire warden.

How to test for it

The test is simple: send a PURGE request to the target website using the curl command-line tool. curl is a program that lets you send HTTP requests from a terminal. You do not need an account or any special tools.

The command is:

Bash
curl -X PURGE https://target.com

Let us break it down:

  • curl is the program that sends the request.
  • -X PURGE tells curl to use the HTTP method PURGE instead of the usual GET. The method is the action you want the server to perform. GET means "give me this page". PURGE means "delete the cached copy of this page".
  • https://target.com is the address of the website you are testing. Replace it with the real target.

No cookies, no login, no special headers are sent. That is the whole point: we want to see if the server accepts a purge request from an anonymous user.

If the website is vulnerable, the response will look like this:

Vulnerable From the original on sapt.medium.com

Vulnerable

If the website is not vulnerable, the response will look like this:

Not Vulnerable From the original on sapt.medium.com

Not Vulnerable

The report shows these two responses as screenshots. It does not spell out the exact status codes or response bodies in text, so the difference is shown visually.

Why this happens

The mistake is in how the cache purge endpoint is authorised. The purge request is accepted from any user, including unauthenticated ones, instead of being restricted to authenticated users or disallowed entirely. The report does not describe the server or cache software involved, so the exact configuration that exposes the method is not stated. The report does not describe the configuration that allows an anonymous purge request.

Impact

Because an anonymous user can delete or invalidate the caches stored for a resource, the report lists two consequences: increased bandwidth costs and degraded application performance. Allowing anonymous users to purge cache could be used to maliciously degrade performance, for example by forcing the origin to regenerate pages that would otherwise have been served from cache. The report does not quantify the effect, name affected endpoints beyond the target host, or describe any data exposure; the impact it describes is availability and cost, not confidentiality or integrity.

How to fix it

The mitigation given in the report is to disallow cache purge requests or to limit them to authenticated users only.

Other things to test

  1. Send PURGE to other hosts and paths on the same estate, including static asset paths and API routes. A positive result is a response that indicates the cached object was removed rather than rejected.
  2. Try the purge against a resource you can observe, then request it again and look for a cache miss or a slower origin-generated response. A positive result is a cache that was populated before the purge and is regenerated afterwards.
  3. Repeat the request with no cookies or authorisation headers at all, as in the original check, and compare with an authenticated request. A positive result is that both are accepted, showing the check is missing rather than merely weak.
  4. Test other cache-management methods that some servers expose, such as PURGE on individual URLs versus a wildcard purge. A positive result is any anonymous request that invalidates more than the single resource it names.

The reference the report points to for further reading is the HackerOne report at https://hackerone.com/reports/154278.

From the original on sapt.medium.com

Glossary

  • Cache: A temporary storage location that keeps copies of data or files so they can be accessed faster.
  • Cache purge request: An HTTP request that instructs a server or cache to delete a cached resource.
  • Unauthenticated: Not logged in; without proof of identity.
  • Authenticated: Having proven your identity, usually by logging in.
  • HTTP method: The action verb in an HTTP request, such as GET, POST, or PURGE.
  • GET: The HTTP method used to request a resource, like a web page.
  • PURGE: A non-standard HTTP method used by some caching servers to invalidate a cached resource.
  • curl: A command-line tool for sending HTTP requests and other data transfers.
  • Bandwidth: The amount of data transferred over a network; higher bandwidth usage can cost more money.
  • Degraded performance: When a system responds more slowly or handles fewer requests than normal.
  • Origin server: The original server that holds the actual data and generates pages when they are not in the cache.
  • API: Application Programming Interface; a set of rules that lets different software talk to each other.
  • Cookie: A small piece of data stored by the browser and sent with requests, often used to identify a logged-in user.
  • Authorisation header: An HTTP header that carries credentials (like a token) to prove the sender is allowed to perform an action.
  • Token: A piece of data used to authenticate a user or request, often replacing a password.
  • Hall of fame: A public list of people who have contributed to a bug bounty programme, often for valid reports.
  • Bug bounty programme: A programme that rewards people for finding and reporting security vulnerabilities.
  • Misconfiguration: A setting or setup mistake that leaves a system less secure than intended.
  • Availability: The property of a system being accessible and usable when needed; attacks can target availability by making a service slow or unavailable.
  • Confidentiality: The property of keeping data secret and only accessible to authorised parties.
  • Integrity: The property of data being accurate and unaltered by unauthorised parties.
  • Wildcard purge: A purge request that invalidates multiple cached resources at once, often using a pattern.
  • Static asset: A file like an image, font, or stylesheet that does not change often and is often cached.
  • API route: A URL path that is part of an API, used by software to interact with the service.

More by Prajit Sindhkar

View all

1 more disclosed report, best first.

More from Apple

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.