No Token. No Session. No Problem. How a Default GraphQL Endpoint
The Liferay GraphQL endpoint at /o/graphql/v1 was accessible without authentication, exposing 577 queries and 990 mutations. An attacker could read existing workflow definitions containing Groovy scripts and create and activate a new workflow with a Groovy payload, potentially leading to remote code execution.
It was one of those cold Ramadan nights. The kind where everyone else is asleep, the house is quiet, and the only light in the room is the pale glow of the terminal.
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 missing authentication checks on the GraphQL API resolvers, allowing unauthenticated access to sensitive mutations.
Impact
An unauthenticated attacker could read sensitive workflow data and create and activate a malicious workflow, potentially leading to remote code execution, though the author stopped before triggering execution.
What the attacker needed
Internet access to the target; no credentials required
How it was found
- Send a POST request to /o/graphql/v1 with a simple schema query and observe HTTP 200 without credentials.
- Query workflowDefinitions to read existing workflow XML content, including Groovy scripts.
- Send a mutation createWorkflowDefinitionSave to create a new workflow with a Groovy payload.
- Send a mutation createWorkflowDefinitionUpdateActive to activate the new workflow.
- Attempt to delete the active workflow to confirm it is active via an error message.
- Deactivate and delete the workflow to clean up.
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.
A GraphQL endpoint is a way for programs to ask a server for data. Here, the server did not check who was asking, so anyone on the internet could read and change important settings. The attacker could add a script that runs commands on the server, which is very dangerous.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.