Unauthenticated Persistent Query Write & QueryId Hijacking
The WPGraphQL Smart Cache plugin saved persisted GraphQL queries and registered query aliases without checking authentication or capabilities. An unauthenticated attacker could create published posts in the graphql_document custom post type and permanently hijack queryId aliases, breaking headless applications for all users.
medium.com
Published on medium.com
Infosec
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
WPGraphQL is a WordPress plugin that exposes a GraphQL endpoint, and WPGraphQL Smart Cache is a companion plugin that adds caching behaviour on top of it. Headless WordPress applications commonly use persisted queries: instead of sending a full GraphQL document on every request, the client sends a short alias (a queryId) that the server maps to a stored document. The Smart Cache plugin handles incoming GraphQL requests and saves this data, which is the feature at the centre of this write-up.
The author describes this as their first CVE in the WPGraphQL ecosystem. The vulnerability allows any unauthenticated user on the internet to write directly into the WordPress database and permanently hijack query aliases used by headless applications. It is tracked as CVE-2026-92099.
Setup
The report does not describe a lab setup, accounts, roles or specific plugin versions. The only precondition that matters is a WordPress installation running the WPGraphQL Smart Cache plugin with its GraphQL endpoint reachable over HTTP. No authentication is required to trigger the issue, which is the point of the finding.
Finding it
While auditing the WPGraphQL Smart Cache plugin, the researcher looked at how the plugin handles incoming requests and saves data. Attention was drawn to the graphql_request_data filter hook. That hook fires on every HTTP GraphQL request, without verifying who is making it.
The question that led to the CVE was: what would happen if an unauthenticated user forced the application to process a crafted persistent query?
Exploitation
Step 1: send an unauthenticated GraphQL request with a chosen queryId
The raw unauthenticated HTTP request used to trigger the vulnerability and hijack the queryId is:
curl -s -X POST https://victim.example/graphql \ -H "Content-Type: application/json" \ -d '{"query":"{ __typename }","queryId":"homepage-posts"}'
The request is a plain POST to the /graphql endpoint with a JSON body. The query field holds a trivial GraphQL document ({ __typename }), and the queryId field holds the alias the attacker wants to claim, here homepage-posts. No cookie, token or other credential is sent.
Because the graphql_request_data filter fires on every HTTP GraphQL request, including unauthenticated ones, the plugin processes the supplied queryId and saves the persisted query. The report does not show the HTTP response returned by this request.
Step 2: the alias is now owned by the attacker
Once processed, the alias homepage-posts is registered to the attacker's document. The alias homepage-posts is now registered to the attacker's document, and the report states this permanently hijacks queryId aliases used by headless applications, breaking application functionality for all end users.
Root cause
The WPGraphQL Smart Cache plugin does not perform authentication or capability checks before saving persisted GraphQL queries and registering query aliases. The graphql_request_data filter hook fires on every HTTP GraphQL request, including unauthenticated ones, and calls wp_insert_post() with post_status set to publish.
As a result, an unauthenticated remote attacker can create arbitrary published posts in the graphql_document custom post type and permanently hijack queryId aliases used by headless WordPress applications. The missing authorisation check on a hook that runs for every request is what allows the write.
Impact
The report stresses that this is not just a simple arbitrary database write. An unauthenticated attacker can effectively break the entire functionality of a headless application relying on this plugin, leading to a severe disruption of the service for all end users. The effect is persistent: the hijacked alias remains in place, and the impact applies to every user of the affected application, not only to the attacker's own session.
Fix
Variants to test
References
- GHSA-r844-6gqh-59qj
- WPScan vulnerability entry 3563529f-5050-4f92-9a3c-44ee850254bd
- CVE-2026-92099
What happened, in plain words
A security researcher found a bug in a WordPress plugin called WPGraphQL Smart Cache. The bug lets anyone on the internet, without logging in, write data into a WordPress site's database. That data is a saved GraphQL query, and the attacker can choose the short name (the queryId) that the site uses to look it up. Once the attacker has claimed a name, the alias is permanently hijacked, which can break a website that relies on this plugin.
This was the researcher's first CVE in the WPGraphQL ecosystem. A CVE is a public identifier given to a known security flaw so that people can track it; this one is CVE-2026-92099.
To follow the rest of this article you only need to know how to use a browser. Every new term is explained where it first appears, and there is a glossary at the end.
Background: the pieces involved
WordPress and plugins
WordPress is a popular system for building websites. Its core is fairly small, and extra features are added through plugins, which are add-on pieces of software. A plugin can add a shop, a contact form, or, in this case, a way for other programs to ask the site for data.
GraphQL and WPGraphQL
GraphQL is a way for one program to ask another for exactly the data it wants. You send a request describing the shape of the answer, and the server sends back data in that shape. Think of it like a restaurant menu where you write down precisely which ingredients you want on your plate, rather than picking a fixed set meal.
WPGraphQL is a WordPress plugin that adds a GraphQL endpoint to a WordPress site. An endpoint is simply a web address that accepts requests of a particular kind; here it is the address programs send their GraphQL questions to.
Headless WordPress and persisted queries
A headless WordPress site uses WordPress only to store and manage content, while a separate application (for example a mobile app or a modern website) fetches that content through the GraphQL endpoint and displays it. The WordPress part has no visible pages of its own; it is just the back end.
Sending a full GraphQL question on every single request is wasteful, so headless applications often use persisted queries. Instead of sending the whole question each time, the client sends a short nickname, called a queryId, and the server looks up the full saved question that belongs to that nickname. It is like a regular at a cafe saying "the usual" instead of listing the whole order: the staff already have it written down under that name.
WPGraphQL Smart Cache
WPGraphQL Smart Cache is a companion plugin that sits on top of WPGraphQL and adds caching behaviour. Caching means keeping a copy of something so it can be served again quickly without redoing the work. Part of what this plugin does is handle incoming GraphQL requests and save data related to them, and that saving feature is where the problem lies.
Finding the bug
While auditing the WPGraphQL Smart Cache plugin, the researcher looked at how the plugin handles incoming requests and saves data. Auditing here means reading the plugin's code carefully, looking for places where it trusts input it should not trust.
Attention was drawn to something called the graphql_request_data filter hook. In WordPress, a hook is a named point in the code where other code can step in and run its own logic. A filter is a kind of hook that lets that extra code modify data as it passes through. The important detail is that this hook fires on every HTTP GraphQL request, without checking who is making the request.
An HTTP request is the message a browser or program sends to a web server to ask for something. The server replies with an HTTP response. The word unauthenticated means the request carries no proof of identity: no login, no password, no session. Anyone can send one.
The question that led to the CVE was:
what would happen if an unauthenticated user forced the application to process a crafted persistent query?
In plain words: if a stranger with no account sends a request containing a saved query of their own choosing, does the site accept it?
The details of the flaw
The WPGraphQL Smart Cache plugin does not perform authentication or capability checks before saving persisted GraphQL queries and registering query aliases. An authentication check verifies who you are; a capability check verifies what you are allowed to do. Neither happens here.
The graphql_request_data filter hook fires on every HTTP GraphQL request, including unauthenticated ones, and calls wp_insert_post() with post_status set to publish.
wp_insert_post() is a built-in WordPress function that creates a new post, meaning a piece of stored content. post_status is the field that says whether that content is a draft or live; setting it to publish makes it live immediately. So an anonymous request can cause the site to create a live piece of content.
This allows unauthenticated remote attackers to create arbitrary published posts in the graphql_document custom post type and permanently hijack queryId aliases used by headless WordPress applications, breaking application functionality for all end users.
A custom post type is a category of stored content that a plugin defines for its own use; graphql_document is the category where this plugin keeps its saved GraphQL queries. To hijack an alias means to take over the nickname so that it now points at your content instead of the original. Remote simply means the attacker is somewhere else on the internet, not sitting at the machine.
Proof of concept
A proof of concept (PoC) is a small, concrete demonstration that a bug is real and can actually be triggered, rather than just a theory.
The image is captioned PoC Unauthenticated Persistent Query Write.
For those who want to reproduce the issue or see the exact payload, here is the raw unauthenticated HTTP request used to trigger the vulnerability and hijack the queryId:
curl -s -X POST https://victim.example/graphql \ -H "Content-Type: application/json" \ -d '{"query":"{ __typename }","queryId":"homepage-posts"}'
Line by line, in plain words:
curlis a command-line tool for sending HTTP requests. It is what a browser does under the hood, but typed out by hand.-stells it to stay quiet and not print progress noise.-X POSTsays the request is aPOST, the HTTP method normally used to send data to a server rather than just ask for a page.https://victim.example/graphqlis the address being contacted.victim.exampleis a placeholder hostname standing in for a real site, and/graphqlis the endpoint path where the GraphQL plugin listens.-H "Content-Type: application/json"adds a header, which is extra information attached to a request. This one tells the server that the body is formatted as JSON, a common text format for structured data.-d '...'is the body of the request, the actual data being sent. Inside it,"query":"{ __typename }"is a deliberately trivial GraphQL question that just asks the server for its own type name, and"queryId":"homepage-posts"is the nickname the attacker wants to claim.
Notice what is missing: there is no cookie, no token and no password anywhere in this request. A cookie is a small piece of data a site stores in your browser to remember who you are after you log in; a token is a similar proof of identity passed in a header or the body. Their absence is the whole point: the request is anonymous.
Because the graphql_request_data filter fires on every HTTP GraphQL request, including unauthenticated ones, the plugin processes the supplied queryId and saves the persisted query. The report does not show the HTTP response returned by this request.
What happens next
Once processed, the alias homepage-posts is registered to the attacker's document. The alias homepage-posts is now registered to the attacker's document, and the report states this permanently hijacks queryId aliases used by headless applications, breaking application functionality for all end users.
Why it works
The root cause is the missing check. The plugin does not perform authentication or capability checks before saving persisted GraphQL queries and registering query aliases.
Two things combine to make this serious:
- The hook runs for every request, so there is no gate that anonymous traffic fails to pass.
- The content is saved as
publish, so it is live straight away.
As a result, an unauthenticated remote attacker can create arbitrary published posts in the graphql_document custom post type and permanently hijack queryId aliases used by headless WordPress applications. The missing authorisation check on a hook that runs for every request is what allows the write.
Impact
The report stresses that this is not just a simple arbitrary database write. An unauthenticated attacker can effectively break the entire functionality of a headless application relying on this plugin, leading to a severe disruption of the service for all end users. The effect is persistent: the hijacked alias remains in place, and the impact applies to every user of the affected application, not only to the attacker's own session.
A session is the period during which a site remembers you as logged in. The point here is that the damage is not confined to whoever sent the request; it affects everyone who uses the application afterwards.
Fix
The report does not describe a patch or the code changes made.
In everyday terms: before writing anything down, the plugin should ask "who are you, and are you allowed to do this?" and refuse when the answer is nobody.
Variants to test
If you want to check a site you are authorised to test, these are the variations worth trying. Only ever do this on systems you own or have explicit permission to test.
References
- GHSA-r844-6gqh-59qj
- WPScan vulnerability entry 3563529f-5050-4f92-9a3c-44ee850254bd
- CVE-2026-92099
Glossary
- Alias: a short nickname used in place of a longer piece of data, here the
queryIdthat stands for a saved GraphQL query. - Auditing: reading code carefully to look for security mistakes.
- Authentication check: a check that establishes who is making a request.
- Capability check: a check that establishes whether the requester is allowed to perform an action.
- Caching: keeping a copy of data so it can be served again quickly.
- Cookie: a small piece of data stored in your browser that a site uses to recognise you, often after logging in.
- CVE: a public identifier assigned to a known security vulnerability so it can be tracked.
- Custom post type: a category of stored content that a WordPress plugin defines for its own use.
- Endpoint: a web address that accepts requests of a particular kind.
- Filter: a WordPress hook that lets extra code modify data as it passes through.
- GraphQL: a way for one program to ask another for exactly the data it wants, described by the shape of the answer.
- Headless: a setup where WordPress only stores content and a separate application fetches and displays it.
- Header: extra information attached to an HTTP request or response.
- Hijack: to take over something, here an alias, so it points at the attacker's content.
- Hook: a named point in code where other code can step in and run its own logic.
- HTTP request: the message a browser or program sends to a web server to ask for something.
- HTTP response: the message a web server sends back.
- JSON: a common text format for structured data.
- Persisted query: a GraphQL query stored on the server and looked up by a short nickname instead of being sent in full each time.
- Plugin: an add-on piece of software that extends WordPress.
- POST: an HTTP method normally used to send data to a server.
- Proof of concept (PoC): a small demonstration that a bug is real and can be triggered.
queryId: the nickname a client sends so the server can look up a persisted query.- Remote: carried out from elsewhere on the internet rather than at the machine itself.
- Session: the period during which a site remembers you as logged in.
- Token: a piece of data used as proof of identity, sent with a request.
- Unauthenticated: carrying no proof of identity; anonymous.
- Vulnerability: a weakness in software that can be used to cause harm.
wp_insert_post(): a built-in WordPress function that creates a new stored post.- WPGraphQL: a WordPress plugin that adds a GraphQL endpoint to a site.
- WPGraphQL Smart Cache: a companion plugin that adds caching behaviour on top of WPGraphQL.