From a Single WAF Bypass to 58,000+ Exposed Media Objects
A WAF rule blocked the canonical WordPress REST API path but not the same API under a locale prefix, and the media endpoint returned data without authentication while other endpoints required it. An attacker could read metadata for over 58,000 media objects and, because the server reflected arbitrary origins with credentials, potentially read authenticated API responses cross-origin.
medium.com
Published on medium.com
Bug Bounty
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.
Context
During an authorised bug bounty engagement against the public-facing marketing infrastructure of a multinational fintech platform, the researcher found a chain of issues that started with a WAF path-matching weakness and ended with more than 58,000 media objects exposed across 12 regional locales, five cloud-storage backends and a broad cross-origin attack surface. The write-up deliberately omits identifying URLs, hostnames, organisation names and confidential program information.
The target was a WordPress Multisite deployment behind Cloudflare WAF, serving localised marketing content through multiple regional paths. The WAF had rules intended to stop direct access to the WordPress REST API. A request to the canonical path returned a block:
GET /wp-json/wp/v2/
→ 403 Forbidden
At the edge, the REST API looked adequately protected. The architecture gave a clue: the WordPress installation used locale-specific paths, which made the URL structure itself worth testing.
Setup
The investigation was run with a deliberately minimal tooling footprint, within the program's tooling restrictions:
Tools used:
- curl → all HTTP requests and API enumeration
- Local HTML file → CORS proof of concept
- Manual analysis → response comparison and validation
Not used:
- Automated scanners
- Brute-force tools
- Bulk downloading
The work relied on request/response comparison, application route mapping, authentication-state comparison, pagination metadata, HTTP response headers, manual validation and reproducible proof-of-concept requests. No accounts, roles or software versions are described in the report.
Finding it
Instead of requesting the canonical REST API path, the researcher tested the equivalent route under a locale prefix:
GET /{locale}/wp-json/wp/v2/
→ 200 OK — REST API reachable
Side by side:
/wp-json/wp/v2/ → 403 (WAF block)
/{locale}/wp-json/wp/v2/ → 200 (REST API reachable)
The locale prefix did not represent a different API. It was another path through which the same application's REST functionality was exposed, and the bypass worked across the regional locales tested. The lesson drawn is that edge controls and application routing should be evaluated together, rather than assuming that blocking one canonical path protects every route that reaches the same backend functionality. OWASP likewise recommends mapping application architecture and testing authorisation and control bypasses rather than relying solely on perimeter behaviour.
The researcher's checklist for path-based WAFs, once the obvious path is confirmed blocked, is to test the application's routing model:
- Locale prefixes /{locale}/wp-json/…
- Tenant prefixes /{tenant}/api/…
- API versions /v2/wp-json/…
- Trailing slashes /wp-json/wp/v2//
- Case variations /WP-JSON/WP/V2/
- Double encoding /%77p-json/wp/v2/
The objective is to determine whether multiple application routes converge on the same protected functionality while the security control recognises only one representation.
Exploitation
Step 1: map what the bypass makes reachable
Once the REST API was reachable through the locale-prefixed route, the finding was no longer simply that the WAF could be bypassed. The more important question was what functionality became reachable because of it. Most endpoints tested behaved consistently and required authentication, which made one endpoint stand out.
Step 2: compare authorisation across equivalent endpoints
The media endpoint behaved differently. Endpoints for posts, pages, users, comments and search required authentication, while the media endpoint returned results without credentials:
GET /{locale}/wp-json/wp/v2/posts → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/pages → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/users → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/comments → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/search → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/media → 200 OK + full data
This mattered because it demonstrated an authorisation enforcement inconsistency, not merely that some media was publicly reachable. A statement such as "media files are public" can easily be read as intended behaviour; the stronger evidence is that authentication is enforced on the surrounding REST resources while this specific resource returns data without authentication. That makes the inconsistency explicit and gives a triager a reproducible basis for evaluation. OWASP's authorisation testing guidance recommends checking whether resources can be accessed without the authentication or authorisation level that should be required.
The media metadata also contained author identifiers. Across the affected locales the researcher identified 13+ internal CMS author accounts represented through that metadata, and treated the account information as supporting evidence rather than automatically claiming privilege escalation.
Step 3: quantify the exposure with pagination metadata
The media endpoint supported standard REST API pagination. Rather than downloading the underlying files, the researcher used the API's pagination metadata to size the exposed dataset:
HTTP/1.1 200 OK
X-WP-Total: 4682
X-WP-TotalPages: 47
Using those values across the affected locales, the documented count was 58,961 media objects across 12 locales. Each response included object metadata such as titles, upload dates, author identifiers, file paths and storage-related URLs, without the file itself being downloaded. The researcher deliberately avoided bulk-downloading the dataset: proving scale does not require collecting everything.
Step 4: identify the storage backends
The media metadata showed that the application did not rely on a single storage backend. The exposed objects referenced 5 distinct cloud-storage backends. One appeared to correspond to a production object-storage environment still serving content without authentication. The architecture appeared consistent with a legacy storage system that remained accessible after a CDN or infrastructure migration, but the researcher treated that as an inference rather than a confirmed root cause:
"The storage backend appeared to be a legacy system that remained accessible after the migration; the exact reason for its continued exposure could not be confirmed externally."
The exposed content included corporate documents, draft legal material and organisational charts. The significance was that the WAF bypass and the authorisation inconsistency had exposed a much larger content-discovery surface than the original REST API request suggested.
Step 5: test the CORS behaviour
The exposed REST API led to another observation: the server dynamically reflected arbitrary Origin values.
Request:
Origin: https://attacker.example.com
Response:
Access-Control-Allow-Origin: https://attacker.example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE…
Rather than presenting this as "CORS is misconfigured", the researcher asked what an attacker can actually do with the cross-origin access, and built a minimal local HTML proof of concept:
<script>
fetch('https://target/{locale}/wp-json/wp/v2/media', {
credentials: 'include'
})
.then(r => r.json())
.then(data => {
// Attacker can read authenticated API responses
console.log(data);
});
</script>
The PoC demonstrated four things:
- A page hosted on an attacker-controlled origin could initiate the request.
- The browser included the victim's applicable credentials.
- The target accepted the request and reflected the attacker's origin.
- The browser permitted the attacker's page to access the response.
That turned the finding from a header-level configuration issue into a demonstrated cross-origin authenticated API access path. The researcher described it as a potential session-riding or cross-origin access path to authenticated API functionality rather than claiming arbitrary administrative compromise, because the practical impact depends on the privileges of the victim's authenticated session.
The findings reinforced one another into a chained attack path:
Attacker-controlled origin
↓
Permissive CORS (any origin + credentials)
↓
Authenticated browser request
↓
Locale-prefixed REST API (WAF bypassed)
↓
Application functionality
Step 6: secondary findings
With the REST API accessible, additional information became visible: username enumeration through oEmbed-related functionality, internal and UAT hostnames exposed through plugin configuration, outdated software components reachable through the exposed surface, regional support email addresses embedded in page content, and third-party integration information visible in rendered HTML. Several of these were individually low impact, and the researcher did not inflate their severity. They were used to show the broader consequence of the initial security-control failure: a single WAF path-matching mistake exposed an application surface substantially larger than the endpoint originally being protected.
Root cause
The WAF blocked the canonical REST API path, while the same REST functionality was reachable through locale-prefixed paths. The control recognised one representation of the route; the application accepted several.
Underneath that, the media REST resource did not enforce the authentication that the surrounding resources (posts, pages, users, comments, search) enforced, so once the edge block was sidestepped, the endpoint returned full metadata to unauthenticated callers. The server reflected arbitrary Origin values and allowed credentials; the PoC showed an attacker-controlled page could read the media API response.
The legacy storage backend that kept serving content without authentication after a migration is described as an inference, not a confirmed root cause.
Impact
An unauthenticated attacker who knew a locale prefix could reach the WordPress REST API and read metadata for 58,961 media objects across 12 locales; the exposed objects referenced 5 distinct cloud-storage backends. The metadata included titles, upload dates, author identifiers, file paths and storage-related URLs, and revealed 13+ internal CMS author accounts. Exposed content included corporate documents, draft legal material and organisational charts.
With the permissive CORS behaviour, a page on an attacker-controlled origin could make credentialed requests and read the responses, giving a potential session-riding or cross-origin access path to authenticated API functionality. The researcher hedged this: the practical impact depends on the privileges of the victim's authenticated session, and arbitrary administrative compromise was not claimed. The secondary findings (username enumeration, internal and UAT hostnames, outdated components, support email addresses, third-party integration details) were individually low impact.
The report was confirmed and rewarded. The researcher notes that technical complexity and bounty severity are shaped by different factors: asset classification, required attacker prerequisites and program-specific risk models all influence the outcome independently of the chain's technical depth.
Fix
The report does not describe specific remediation that was applied.
Variants to test
- Locale and tenant prefixes. Request
/{locale}/wp-json/wp/v2/and/{tenant}/api/…equivalents of a blocked canonical path. A positive result is200where the canonical path returns403. - API version segments. Try
/v2/wp-json/…and similar. A positive result is the same backend functionality answering under a path the WAF does not match. - Trailing slashes and case. Try
/wp-json/wp/v2//and/WP-JSON/WP/V2/. A positive result is a200from the protected handler. - Double encoding. Try
/%77p-json/wp/v2/. A positive result is the decoded path reaching the handler while the rule sees a different string. - Authorisation comparison across sibling endpoints. Request posts, pages, users, comments, search and media without credentials. A positive result is a
401 rest_auth_requiredon the siblings and a200with data on the outlier. - Pagination metadata as a scale measure. Read
X-WP-TotalandX-WP-TotalPagesinstead of downloading objects. A positive result is a defensible count of exposed objects without bulk collection. - CORS reflection with credentials. Send
Origin: https://attacker.example.comand inspect the response. A positive result isAccess-Control-Allow-Originreflecting that origin together withAccess-Control-Allow-Credentials: true. - Cross-origin read PoC. Host a local HTML page that fetches the API with
credentials: 'include'. A positive result is the attacker page reading the response in the browser. - oEmbed and plugin configuration. Check oEmbed-related functionality for username enumeration and rendered HTML and plugin configuration for internal and UAT hostnames. A positive result is internal identifiers or hostnames leaking to unauthenticated users.
What happened, in plain words
A security researcher took part in a bug bounty programme to test the public marketing websites of a large financial technology company. A bug bounty programme is a deal in which a company invites outside researchers to look for security problems and pays them for reporting what they find, as long as the researcher stays within agreed rules.
The researcher found a small mistake in the company's front-door filter, the Web Application Firewall (WAF). A WAF is a piece of software that sits in front of a website and blocks requests that look dangerous or that are not supposed to be allowed. Because of that mistake, the researcher could reach a part of the website that was meant to be hidden. Behind that hidden part, one specific feature (the media library) turned out to hand out information to anyone, without asking for a login. That information described more than 58,000 media objects across 12 regional versions of the site, and the objects referenced 5 different cloud storage services. The same server also had a lax cross-origin policy, which the researcher demonstrated could let a malicious web page read API responses using a logged-in visitor's browser.
The researcher did all of this with very simple tools, did not download the files, and reported the problem. The report was confirmed and rewarded.
This article walks through the same investigation from the beginning, explaining every technical idea as it appears. You only need to know how to use a browser and a computer to follow it.
The target, and the words you need first
Before the steps, here is the setting in plain terms.
The company ran its marketing sites on WordPress Multisite. WordPress is a very common system for building websites. "Multisite" is a mode in which one WordPress installation runs many sites at once, for example one site per country or region. Each regional site lives under its own path, something like /uk/, /de/ or /fr/. A path is the part of a web address after the domain name: in https://example.com/uk/news, the path is /uk/news.
In front of WordPress sat Cloudflare WAF. Cloudflare is a company that provides a protective layer between the internet and a website. The WAF part inspects each incoming request and decides whether to let it through or block it. When it blocks, the visitor usually sees an error page with the status code 403 Forbidden. Status codes are three-digit numbers a web server sends back to say how a request went: 200 OK means success, 401 Unauthorized means you need to log in, 403 Forbidden means you are not allowed, and so on.
The part of WordPress the researcher was interested in is the REST API. An API (Application Programming Interface) is a way for one piece of software to talk to another. A web API is simply a set of web addresses that return data rather than pretty web pages. Think of a restaurant: the dining room is the website you see, and the kitchen is the database behind it. The API is the waiter who carries your order to the kitchen and brings back a plate. WordPress's REST API lives under the path /wp-json/, and it can return lists of posts, pages, users, comments, search results and media items as structured data.
Because that API can reveal a lot, the company had a WAF rule intended to stop people reaching it directly. The researcher confirmed the rule worked on the obvious address:
GET /wp-json/wp/v2/
→ 403 Forbidden
Line by line:
GETis the type of request. It means "please give me this thing". Other common types arePOST(create something),PUT(replace something) andDELETE(remove something)./wp-json/wp/v2/is the path being requested.wp-jsonis the WordPress API,wpis WordPress, andv2is version 2 of the API.→ 403 Forbiddenis the answer: the WAF refused it.
So far, so good: at the outer edge, the API looked protected. But the researcher noticed a clue in how the site was built. Because it was a Multisite with regional paths, the same WordPress features were reachable under many different addresses. That made the address structure itself worth testing. If the WAF only recognises one spelling of an address, what happens with the other spellings?
The tools used
The whole investigation was deliberately light. The researcher listed the tools like this:
Tools used:
- curl → all HTTP requests and API enumeration
- Local HTML file → CORS proof of concept
- Manual analysis → response comparison and validation
Not used:
- Automated scanners
- Brute-force tools
- Bulk downloading
What each line means:
- curl is a command-line program that sends web requests and prints the raw answer. It is like a browser without the pictures: you type an address, you get back exactly what the server says, including the status code and the hidden headers (small labels the server attaches to its answer).
- API enumeration means going through the API's addresses one by one to see what exists and what each one returns.
- A local HTML file is a web page saved on your own computer. Opening it in a browser lets you run a small experiment without putting anything on the internet.
- Manual analysis means the researcher read the answers and compared them by hand, rather than letting a tool decide.
- Automated scanners are programs that fire thousands of known tests at a site. Brute-force tools try huge numbers of guesses, for example passwords. Bulk downloading means copying an entire dataset. The researcher avoided all three; the report says this approach kept the investigation within the programme's tooling restrictions.
The method was: send a request, read the answer, compare it with another answer, and repeat. No accounts, roles or software versions are described in the report.
Finding it: the WAF bypass
A WAF bypass means getting past the filter without breaking it: you find a request the filter does not recognise as the thing it is supposed to block. The researcher tried the same REST API address, but with a regional prefix in front of it:
GET /{locale}/wp-json/wp/v2/
→ 200 OK — REST API reachable
Line by line:
{locale}is a placeholder for a region code such asukorde. The curly braces mean "put a value here".- The rest of the path is identical to the blocked one.
→ 200 OKmeans the server answered successfully. The API was reachable.
Side by side, the difference is stark:
/wp-json/wp/v2/ → 403 (WAF block)
/{locale}/wp-json/wp/v2/ → 200 (REST API reachable)
The first line is the address the WAF knew about, and it was blocked. The second line is the same functionality under a regional prefix, and it was not blocked. The prefix did not lead to a different API; it was simply another door into the same room. The bypass worked across the regional locales the researcher tested.
The lesson: a filter at the edge and the application's own routing (the rules that decide which address leads to which feature) must be looked at together. Blocking one address does not protect every address that ends up at the same place. The OWASP Web Security Testing Guide, a well-known public collection of testing methods, makes the same point: map how the application is built and test whether controls can be bypassed, rather than trusting the outer fence alone.
Once the obvious address is confirmed blocked, the researcher's checklist for path-based WAFs is to test how the application builds its addresses:
- Locale prefixes /{locale}/wp-json/…
- Tenant prefixes /{tenant}/api/…
- API versions /v2/wp-json/…
- Trailing slashes /wp-json/wp/v2//
- Case variations /WP-JSON/WP/V2/
- Double encoding /%77p-json/wp/v2/
What each variant is trying:
- Locale prefixes: put a region code in front, as above. A tenant is a customer or organisation sharing the same platform, so a tenant prefix is the same idea with a customer name instead of a region.
- API versions: move the version number to a different place in the path.
- Trailing slashes: add an extra slash at the end. Some servers treat
/a/band/a/b/as the same thing, while a filter may treat them as different strings. - Case variations: write the path in capitals. Web addresses are usually case-sensitive as text, but many servers do not care about case when matching routes.
- Double encoding:
%77is the encoded form of the letterw. A server that decodes the address before routing will seewp-json, while a filter that compares the raw text sees%77p-jsonand may not recognise it. Encoding is how special or unusual characters are written safely in a web address; decoding turns them back.
The goal of all six is the same: find out whether several different addresses lead to the same protected feature while the security control recognises only one of them.
Mapping what the bypass makes reachable
Once the API answered through the regional prefix, the interesting question changed. It was no longer "can the WAF be bypassed?" but "what can I now reach that I could not before?". This is the difference between finding a broken lock and walking through the door to see what is inside.
Most of the API addresses the researcher tried behaved sensibly: they asked for a login. That consistency is what made one address stand out.
The media authorisation gap
Authorisation is the check that decides whether a particular person is allowed to do a particular thing. Authentication is the earlier step of proving who you are, usually by logging in. A site can authenticate you correctly and still authorise you badly.
The researcher compared several API addresses without logging in at all:
GET /{locale}/wp-json/wp/v2/posts → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/pages → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/users → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/comments → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/search → 401 rest_auth_required
GET /{locale}/wp-json/wp/v2/media → 200 OK + full data
Line by line:
- The first five requests ask for posts (blog articles), pages, users, comments and search results. Each answer is
401, which means "you must log in first". The extra textrest_auth_requiredis the API's own message saying authentication is required. - The sixth request asks for media (the library of images and files). It answers
200 OKand returns full data, with no login at all.
Why does this matter so much? Because "media files are public" is easy to dismiss: many websites show images to everyone on purpose. The stronger evidence is the comparison. The same API, on the same server, behind the same prefix, demands a login for posts, pages, users, comments and search, but hands over media data to anyone. That is an authorisation enforcement inconsistency: the rule exists, but it is not applied evenly. It gives the person reviewing the report a clear, repeatable test: send these six requests and see the difference for yourself. OWASP's authorisation testing guidance recommends exactly this kind of check: can a resource be reached without the login or permission level it should require?
The media data also contained author identifiers, numbers or names saying which internal CMS account uploaded each item. A CMS (Content Management System) is the software editors use to manage a site's content; WordPress is one. Across the affected regions, the researcher counted 13+ internal CMS author accounts visible in that metadata. The researcher treated this as supporting evidence and did not claim it proved a privilege escalation (a step up to more powerful access).
Measuring the exposure without downloading anything
The media API returned its results in pages, the way a search engine shows ten results at a time. This is called pagination. Each page of results comes with headers that say how many items exist in total and how many pages there are. Headers are the small labels attached to every web response, separate from the content itself.
HTTP/1.1 200 OK
X-WP-Total: 4682
X-WP-TotalPages: 47
Line by line:
HTTP/1.1 200 OKis the status line: the version of the web protocol and the success code.X-WP-Total: 4682says there are 4,682 media items in total for that region.X-WP-TotalPages: 47says those items are spread over 47 pages. The numbers fit together: 47 pages of roughly 100 items each is about 4,700.
By reading these two numbers across the affected regions, the researcher arrived at the documented total: 58,961 media objects across 12 locales. Each response also included metadata such as titles, upload dates, author identifiers, file paths and storage-related URLs, all without downloading a single file.
This is a deliberate choice worth copying. Downloading tens of thousands of files would be slow, noisy, and would mean collecting far more data than necessary. The headers alone prove the scale. Proving scale does not require collecting everything.
The storage backends
The metadata showed that the files were not all kept in one place. The exposed objects pointed to 5 distinct cloud-storage backends. A storage backend is the service where files actually live, such as an object-storage bucket (a large online folder) or a content delivery network. A CDN (Content Delivery Network) is a network of servers that serves files quickly from locations near the visitor.
One of those backends looked like a production object-storage environment (the live system, not a test one) that was still serving content without asking for authentication. The researcher's guess was that it was an old storage system left reachable after a migration to a CDN or new infrastructure. A migration is a move from one system to another. But the researcher was careful to label this a hypothesis, not a confirmed cause:
"The storage backend appeared to be a legacy system that remained accessible after the migration; the exact reason for its continued exposure could not be confirmed externally."
That wording matters. "Appeared to be" and "could not be confirmed" keep the claim honest. The exposed content included corporate documents, draft legal material and organisational charts, which is a very different kind of sensitive from a marketing photo.
The point of this step is scale: the original WAF bypass and the missing login check had opened a content-discovery surface far larger than the single API request suggested.
The CORS attack surface
CORS stands for Cross-Origin Resource Sharing. It is a set of rules, enforced by your browser, about whether a web page from one site may read data from another site. An origin is the combination of scheme, domain and port, for example https://attacker.example.com. By default, a page on one origin cannot read responses from another origin, because otherwise any website you visit could quietly read your bank, your email or your work tools using your logged-in session.
A cookie is a small piece of data a site stores in your browser so it can recognise you on the next request; it is how most sites remember that you are logged in. A token is a similar credential, often a long string, used by an application to prove who you are. Both are sent automatically by the browser with requests to the site that issued them, which is exactly why cross-origin reading rules exist.
The researcher sent a request with a made-up origin and watched the reply:
Request:
Origin: https://attacker.example.com
Response:
Access-Control-Allow-Origin: https://attacker.example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE…
Line by line:
Origin: https://attacker.example.comis the request header saying "this request comes from a page at this address". Here it is a fake attacker site.Access-Control-Allow-Origin: https://attacker.example.comis the server's reply: "yes, that origin is allowed to read my answers". The server copied back whatever origin was sent, instead of using a fixed list of trusted sites.Access-Control-Allow-Credentials: truesays "and it may do so while sending the visitor's cookies and other credentials". This is the dangerous part: it turns a read permission into a read permission with the visitor's identity attached.Access-Control-Allow-Methods: GET, POST, PUT, DELETE…lists the request types the browser is told it may use, including ones that change data.
A header saying "CORS is misconfigured" is not very convincing on its own. The real question is what an attacker can actually do with it. So the researcher wrote a tiny web page and opened it locally:
<script>
fetch('https://target/{locale}/wp-json/wp/v2/media', {
credentials: 'include'
})
.then(r => r.json())
.then(data => {
// Attacker can read authenticated API responses
console.log(data);
});
</script>
Line by line:
<script>starts a block of JavaScript, the language browsers run. JavaScript is the code that makes web pages interactive.fetch(...)asks the browser to request a web address. The address here is the media API under a regional prefix, the same one found earlier.credentials: 'include'tells the browser to attach the visitor's cookies and other credentials to that request. This is the key line: without it, the request would be anonymous..then(r => r.json())waits for the answer and converts it from raw text into a JavaScript object (structured data)..then(data => { ... })receives that object. The comment says what it means: the attacker's page can read authenticated API responses.console.log(data)prints the data in the browser's developer console, which is where a researcher would look to confirm it arrived.
The experiment showed four things, in order:
- A page hosted on an attacker-controlled origin could start the request.
- The browser attached the victim's applicable credentials.
- The target accepted the request and echoed the attacker's origin back.
- The browser then allowed the attacker's page to read the response.
That turns a header-level configuration issue into a demonstrated cross-origin authenticated API access path. The researcher described it as a potential session-riding path (using a logged-in visitor's session for something they did not intend) or cross-origin access path to authenticated API functionality. The researcher did not claim arbitrary administrative compromise, because the real impact depends on what the victim's session is allowed to do. The real impact depends on what the victim's session is allowed to do.
The findings reinforce one another into a chain:
Attacker-controlled origin
↓
Permissive CORS (any origin + credentials)
↓
Authenticated browser request
↓
Locale-prefixed REST API (WAF bypassed)
↓
Application functionality
Read the arrows as "leads to". A malicious page (top) is allowed by the loose CORS rules to make a request that carries the visitor's credentials (second and third steps). That request goes to the regional API address, which the WAF does not block (fourth step), and reaches real application features (bottom). Each link is weak on its own; together they form a path from an attacker's page to the application's data.
Secondary findings
With the API reachable, other small leaks became visible:
- Username enumeration through oEmbed-related functionality. oEmbed is a standard that lets a site embed content from another site, for example a video preview. Enumeration means being able to list valid usernames, which helps someone guess logins.
- Internal and UAT hostnames exposed through plugin configuration. UAT stands for User Acceptance Testing, a pre-release test environment. A hostname is a server's name, and internal names are not meant to be public. A plugin is an add-on that extends WordPress.
- Outdated software components reachable through the exposed surface.
- Regional support email addresses embedded in page content.
- Third-party integration information visible in the rendered HTML. Rendered HTML is the final page source your browser receives.
Several of these are low impact on their own, and the researcher did not inflate them. Their role is to show the wider consequence: a single WAF path-matching mistake exposed an application surface much larger than the endpoint it was meant to protect.
Reflections
The report was confirmed and rewarded. The researcher notes that technical complexity and bounty size are shaped by different things: how the affected asset is classified, what an attacker needs before they can exploit it, and the programme's own risk model all influence the outcome, independently of how clever the chain was. In other words, the size of the reward is shaped by factors other than how clever the chain was.
Methodology
The investigation relied on comparing requests and responses, mapping the application's routes, comparing behaviour with and without authentication, reading pagination metadata and response headers, validating by hand, and writing reproducible proof-of-concept requests. A proof of concept (PoC) is a small, safe demonstration that a problem is real. Reproducible means someone else can follow the same steps and see the same result, which is what a reviewer needs in order to trust a report. Keeping to this minimal approach also kept the work inside the programme's tooling restrictions.
What the researcher learned
- Do not assume the canonical path is the only path. The canonical path is the standard, obvious address. Regional prefixes, tenant names, version numbers and other path parts can create alternate addresses for the same feature. Learn how the application builds its routes.
- Treat CORS as an attack surface, not just a header problem. A reflected origin is only the start. Ask: are credentials allowed, can an attacker's page read the answer, which logged-in endpoints are reachable, and can anything be changed, not just read?
- Compare authorisation across equivalent endpoints. If five addresses say
401and the sixth says200with sensitive data, document the difference. A comparison is far stronger evidence than a single request. - Quantify exposure without unnecessary collection. The pagination headers were enough to establish 58,961 objects. That is a defensible number obtained with minimal interaction with the target.
- Keep observed facts separate from hypotheses. Instead of "the old bucket was forgotten after the CDN migration", write "the storage backend appeared to be a legacy system that remained accessible; the exact reason could not be confirmed externally". The second version cannot be proved wrong.
- Do not stop at the first valid finding. The WAF bypass alone was already reportable. Continuing to map what it exposed revealed the authorisation inconsistency, the 58,961 media objects, the 5 storage backends, the internal CMS metadata and the cross-origin path. The most valuable part was not one bug; it was understanding what that bug made possible.
Final takeaway
"A vulnerability should be investigated as a change in attack surface, not merely as an isolated technical defect."
A WAF bypass can look like a small path-matching mistake. But if it reaches an application layer with uneven authorisation, exposed data, loose CORS, old storage and internal metadata, the real impact can be much wider. The strongest reports are not the ones with the most bugs; they are the ones that clearly establish:
What was supposed to be protected
↓
How that protection was bypassed
↓
What became reachable
↓
What was actually demonstrated
↓
What impact was proven
↓
What conditions an attacker needs
That is the method the researcher says they will keep applying.
Variants to test
If you want to practise the same thinking on a system you are allowed to test, these are the checks described, each with what a positive result looks like:
- Locale and tenant prefixes. Request
/{locale}/wp-json/wp/v2/and/{tenant}/api/…equivalents of a blocked canonical path. A positive result is200where the canonical path returns403. - API version segments. Try
/v2/wp-json/…and similar. A positive result is the same backend functionality answering under a path the WAF does not match. - Trailing slashes and case. Try
/wp-json/wp/v2//and/WP-JSON/WP/V2/. A positive result is a200from the protected handler. - Double encoding. Try
/%77p-json/wp/v2/. A positive result is the decoded path reaching the handler while the rule sees a different string. - Authorisation comparison across sibling endpoints. Request posts, pages, users, comments, search and media without credentials. A positive result is a
401 rest_auth_requiredon the siblings and a200with data on the outlier. - Pagination metadata as a scale measure. Read
X-WP-TotalandX-WP-TotalPagesinstead of downloading objects. A positive result is a defensible count of exposed objects without bulk collection. - CORS reflection with credentials. Send
Origin: https://attacker.example.comand inspect the response. A positive result isAccess-Control-Allow-Originreflecting that origin together withAccess-Control-Allow-Credentials: true. - Cross-origin read PoC. Host a local HTML page that fetches the API with
credentials: 'include'. A positive result is the attacker page reading the response in the browser. - oEmbed and plugin configuration. Check oEmbed-related functionality for username enumeration and rendered HTML and plugin configuration for internal and UAT hostnames. A positive result is internal identifiers or hostnames leaking to unauthenticated users.
Glossary
- API (Application Programming Interface): a set of addresses or functions that let one piece of software ask another for data or actions; a web API returns data rather than web pages.
- Attack surface: everything an attacker could possibly reach and try to use.
- Authentication: proving who you are, usually by logging in.
- Authorisation: deciding whether an identified person is allowed to do a particular thing.
- Authorisation enforcement inconsistency: a rule that is applied to some resources but not to others that should be equally protected.
- Brute-force tool: software that tries huge numbers of guesses, for example passwords.
- Bug bounty programme: a scheme where a company invites outside researchers to report security problems and pays for valid reports within agreed rules.
- Canonical path: the standard, obvious address of a feature.
- CDN (Content Delivery Network): a network of servers that delivers files quickly from locations near the visitor.
- Cloud storage backend: an online service where files are actually stored, such as an object-storage bucket.
- CMS (Content Management System): software editors use to manage a website's content; WordPress is one.
- Cookie: a small piece of data a site stores in your browser so it can recognise you on later requests.
- CORS (Cross-Origin Resource Sharing): browser rules about whether a page from one origin may read responses from another origin.
- Credentials: the data that proves your identity to a site, such as cookies or tokens.
- curl: a command-line program that sends web requests and prints the raw response.
- Decoding: turning encoded characters in a web address back into their normal form.
- Encoding: writing special or unusual characters in a safe form, for example
%77forw. - Enumeration: going through a list of addresses or names one by one to see what exists.
- GET / POST / PUT / DELETE: request types meaning, respectively, fetch, create, replace and remove.
- Header: a small label attached to a web request or response, separate from the content.
- Hostname: the name of a server, such as
example.comor an internal name. - HTML: the language web pages are written in; rendered HTML is the final page source the browser receives.
- HTTP status code: a three-digit number in a response saying how the request went, such as
200 OK,401 Unauthorizedor403 Forbidden. - JavaScript: the programming language browsers run to make pages interactive.
- Locale: a region or language variant of a site, often used as a path prefix such as
/uk/. - Migration: moving from one system or infrastructure to another.
- oEmbed: a standard that lets a site embed content from another site, such as a video preview.
- Origin: the combination of scheme, domain and port that identifies where a web page comes from, for example
https://attacker.example.com. - OWASP: a public project that publishes widely used guidance for web application security testing.
- Pagination: splitting a long list of results into pages, usually with headers saying how many items and pages exist.
- Path: the part of a web address after the domain name.
- Plugin: an add-on that extends a system such as WordPress.
- PoC (proof of concept): a small, safe demonstration that a problem is real.
- Privilege escalation: gaining a higher level of access than you are supposed to have.
- REST API: a web API organised around addresses that represent resources, such as posts or media.
- Session: the period during which a site remembers that you are logged in.
- Session-riding: using someone else's logged-in session for actions they did not intend.
- Tenant: a customer or organisation sharing the same platform, often identified by a path prefix.
- Token: a credential, often a long string, used by an application to prove who you are.
- UAT (User Acceptance Testing): a pre-release test environment.
- Username enumeration: being able to list valid usernames, which helps someone guess logins.
- WAF (Web Application Firewall): software in front of a website that inspects requests and blocks ones that look dangerous or are not allowed.
- WAF bypass: getting past a WAF without breaking it, by sending a request it does not recognise as the thing it should block.
- WordPress Multisite: a WordPress mode in which one installation runs many sites, often one per region.