Skip to content
Cache bugs Write-up Intermediate

Interesting : Profile Pictures CP DoS

The application named uploaded profile pictures using predictable Unix timestamps and cached all responses, including 404 errors, for four hours. An attacker could pre-request future timestamp URLs to cache 404s, causing newly uploaded profile pictures to appear missing for up to four hours.

medium.com

Published on medium.com

During a bug Hunting, I tested a university Like web application that allowed users to enroll in courses, earn certificates, and share badges.

Exploit5lover, 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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application used predictable Unix timestamps as filenames and applied a long cache lifetime to 404 responses without distinguishing them from successful uploads.

Impact

Newly uploaded profile pictures could be made unavailable to viewers for up to four hours, disrupting a core feature.

What the attacker needed

Ability to send HTTP requests; predictable timestamp-based filenames; caching of 404 responses

How it was found

  1. Upload a profile picture and intercept the request to observe the image URL pattern based on a Unix timestamp.
  2. Notice that the response includes a Cache-Control header with max-age=14400, caching all responses including 404s.
  3. Request URLs for future timestamps to cause the server to cache 404 errors for those paths.
  4. Run a script sending HEAD requests to many future timestamp URLs to poison the cache.
  5. When a user later uploads a picture using one of those timestamps, viewers receive the cached 404 for up to four hours.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you upload a profile picture, the website saves it under a name based on the current time in seconds. The site also remembers (caches) every response for that name for four hours, even if the file does not exist yet. By asking for picture names that will be used soon, an attacker can make the site remember 'not found' so that real pictures uploaded later seem to be missing.

What is Cache bugs?

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.

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.