Skip to content

2025-04-04 Add Detecting Web Cache Deception Content #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Web Cache Deception/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ The following URL format are a good starting point to check for "cache" feature.
* `https://example.com/app/conversation/;.js`
* `https://example.com/home.php/non-existent.css`

## Detecting Web Cache Deception

1. Detecting delimiter discrepancies: `/path/<dynamic-resource>;<static-resource>`
* For example: `/settings/profile;script.js`
* If the origin server uses `;` as a delimiter but the cache isn't
* The cache interprets the path as: `/settings/profile;script.js`
* The origin server interprets the path as: `/settings/profile`
* For more delimiter characters: see [Web cache deception lab delimiter list](https://portswigger.net/web-security/web-cache-deception/wcd-lab-delimiter-list)
2. Detecting normalization: `/wcd/..%2fprofile`
* If the origin server resolved the path traversal sequence but the cache isn't
* The cache interprets the path as: `/wcd/..%2fprofile`
* The origin server interprets the path as: `/profile`

## CloudFlare Caching

CloudFlare caches the resource when the `Cache-Control` header is set to `public` and `max-age` is greater than 0.
Expand Down