A bug bounty story by abdelrhmanxd

Introduction
Sometimes, a small detail in an API response can lead to a much bigger security issue.
While exploring a GraphQL API during a bug bounty engagement, I discovered an authorization flaw that allowed a low-privileged account to take control of a subscription belonging to another account.
What started as experimenting with GraphQL mutations eventually led to a full subscription takeover.
In this article, I'll explain how I discovered the issue, how I reproduced it, and why it mattered.
The target company and bug bounty program are intentionally not disclosed.
Summary
The application used GraphQL to manage cloud service instances and subscriptions.
I was testing with an account that had the Account Viewer role. This role was supposed to have limited permissions.
However, I discovered that the backend did not properly enforce authorization when handling certain operations involving subscriptions and instances.
By using identifiers returned by the API, I was able to perform an operation that transferred control of another account's subscription to my lower-privileged account.
The resulting instance was assigned a new instanceId, and I could manage it from my account.
The main issue was broken authorization leading to subscription takeover.
Background
The application provided a GraphQL API for managing service instances.
GraphQL was particularly interesting during my testing because the API exposed different queries and mutations for managing resources.
I started by exploring the available operations and understanding how the application handled requests from different user roles.
My testing account had the Account Viewer role, while the resources I was examining belonged to an account with higher privileges.
The main question was simple:
Could a low-privileged user perform operations on resources belonging to another account?
Discovery Process
1. Exploring GraphQL mutations
I started experimenting with invalid and unknown mutation names.
Instead of returning only a generic error, the server sometimes suggested valid mutation names.
For example, an error could contain a suggestion similar to:
Do you mean deleteInstance?
This was not formal GraphQL introspection. It was error-based discovery through the server's mutation suggestions.
I repeated this process to identify potentially interesting operations.
There were several unsuccessful attempts, but one operation eventually became particularly interesting: deleteInstance.
2. Understanding resource identifiers
While exploring the API responses, I noticed that resource identifiers were exposed in responses.
This gave me a better understanding of how instances and subscriptions were referenced.
I then started examining how these identifiers were handled when sending mutations from my lower-privileged account.
The important part was that having access to an identifier should not automatically grant permission to perform operations on the corresponding resource.
Authorization must be enforced on the server side.
3. Testing the authorization boundary
I used the identifiers associated with the higher-privileged account while authenticated as the Account Viewer.
During testing, I discovered that the backend accepted an operation involving the other account's subscription without returning an authorization error.
The result was more serious than simply creating an additional instance.
The subscription disappeared from the original owner's account. When the original owner attempted to access the previous instance through its direct URL, the application returned:
404 Not Found
Meanwhile, the Viewer account gained control over the resulting instance.
The new instance had a newly generated instanceId and was renamed to Pwned.
This was the point where I confirmed that the issue was not just an ordinary resource access problem. It resulted in a subscription takeover.
Reproduction Steps
The following steps describe the vulnerability at a high level. Identifiers and target-specific details have been redacted.
Prerequisites:
An account with the
Account Viewerrole.Access to the GraphQL API.
A subscription and instance belonging to a separate, higher-privileged account.
Step 1: Authenticate as Account Viewer
Log in using an account with the Account Viewer role.
Step 2: Obtain resource identifiers
Inspect the GraphQL responses and identify the relevant instance and subscription identifiers.
For example:
{
"instanceId": "<REDACTED_INSTANCE_ID>",
"subscriptionId": "<REDACTED_SUBSCRIPTION_ID>"
}Step 3: Discover the relevant mutation
Explore the GraphQL mutation suggestions and identify the operation used to manage instances.
The testing revealed that the backend did not properly enforce the expected authorization boundary.
Step 4: Perform the operation
Using the Viewer session, perform the operation involving the other account's subscription.
The backend accepted the request without returning an authorization error.
Step 5: Verify the takeover
After the operation:
The original owner could no longer find the subscription in their account.
Accessing the previous instance URL returned
404 Not Found.The Viewer account gained access to the resulting instance.
A new
instanceIdwas generated.The instance could be renamed to
Pwned.
Step 6: Confirm control
From the Viewer account, I could access and manage the resulting instance, including its available management sections such as Service IDs and API Keys.
This confirmed that the impact went beyond merely viewing resource information.
Impact
The vulnerability allowed a low-privileged user to take control of a subscription associated with another account.
The demonstrated impact included:
Subscription takeover: The original owner lost access to the affected subscription.
Instance control: The Viewer account gained control over the resulting instance.
Unauthorized resource management: The attacker could manage the instance through the application interface.
Loss of access for the original owner: The previous instance URL returned
404 Not Found.
The key security issue was the lack of proper authorization checks when handling operations involving resources belonging to another account.
A user's role should determine what they can do, regardless of whether they know a valid resource identifier.
Fix and Disclosure
I reported the vulnerability through the bug bounty program.
The report was eventually marked as:
Resolved
The program did not provide a detailed technical explanation of the specific changes made to address the issue, so I cannot confirm the exact implementation of the fix.
From a security perspective, the application should enforce server-side authorization checks for every operation involving subscriptions and instances.
In particular, the backend should verify that the authenticated user has the required permissions over the target resource before allowing operations that modify ownership or subscription associations.
Lessons Learned
This finding reinforced a few important lessons for me:
1. Never trust resource identifiers as authorization.
Knowing an instanceId or subscriptionId should never be enough to access or modify the associated resource.
2. Test with different roles.
Using accounts with different permission levels can reveal authorization issues that are difficult to notice when testing only with an administrator account.
3. GraphQL error messages can reveal useful information.
Mutation suggestions and error responses can help researchers understand the API's available operations, even without formal introspection.
4. Follow the impact, not just the first unexpected response.
The most important discovery was not simply that the backend accepted an unauthorized request. It was what happened afterward: the original owner lost access, and another account gained control.
Closing Thoughts
This was a good reminder that authorization flaws can have consequences far beyond exposing data.
A single missing authorization check can turn a seemingly harmless API operation into a serious account and resource ownership issue.
For me, the most valuable part of this finding was learning to follow the entire operation lifecycle instead of stopping at the first unexpected response.
Thanks for reading!
If you're interested in bug bounty hunting and practical application security, check out the Bugmith Community About page for community links and an invitation to our Discord server.