The Tiny Project Logic Bug That Unlocked Enterprise
A project grouping endpoint accepted a project as its own child, and the backend then treated that project as having an Enterprise plan. A free-tier user could therefore obtain Enterprise features without paying, and a separate clean child project could inherit the Enterprise state.
Published on 0xkrishn.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
The target was a project-management feature that allowed Enterprise projects to be grouped with child projects. The grouping capability was intended to be Enterprise-only, and the normal child-project workflow was not available to accounts on the Free plan. The researcher's interest was in what the backend actually enforced, rather than what the UI offered.
The write-up describes a business-logic and privilege-escalation issue: a Free project could be made to report Enterprise entitlement by manipulating the project graph through the grouping endpoint.
Setup
The researcher used a normal Free-tier project on a test account. No special tooling is described beyond direct API requests and refreshing the application to observe derived state. The starting state of the project was:
plan: free
enterprise: false

The image is captioned as the initial project state.
Finding it
The project-grouping feature was supposed to be Enterprise-only. From a Free account the normal child-project workflow was not available, which made the researcher ask whether the server actually enforced the rule rather than assuming the UI reflected the backend.
The underlying endpoint was identified as:
PATCH /api/projects/<project>/children
This endpoint accepts project IDs that are supposed to become children of the parent project. The first obvious test, adding another project as a child, did not produce anything useful from the Free account.
The researcher then considered an assumption common to parent/child systems: a project cannot logically be its own child. Because that assumption is so obvious, it may never be explicitly validated. That led to sending the project's own ID back as its own child.
Exploitation
Step 1: Send the project as its own child
The request was conceptually:
PATCH /api/projects/<project>/children
Content-Type: application/json
X-XSRF-TOKEN: <redacted>
with the body:
[
{ "_id": "<same-project-id>" }
]
The _id value is the same project ID used in the URL path, making the project its own child. The researcher expected a 400 Bad Request or some validation error. Instead, the server accepted the request, and the response included the project's own ID in childrenProjects. The relationship was not only accepted by the endpoint, it was persisted.
Step 2: Observe the immediate mutation response
The immediate mutation response still reported:
plan: free
enterprise: false
At this point it looked like the self-reference might be a database edge case with no security impact. The researcher refreshed the application because mutation responses can differ from derived state.
Step 3: Refresh and observe the derived state
After refreshing, the same project reported:
plan: enterprise
enterprise: true

The dashboard also exposed an Enterprise Dashboard entry. The researcher then checked the backend again with a fresh fetch, which returned:
plan = enterprise
enterprise = true
The server itself was treating the project as Enterprise, so the change was not merely cosmetic in the frontend.
Step 4: Note the side effect on the project
Because the project had been made its own child, a circular project relationship existed. The public documentation route followed that relationship repeatedly, conceptually:
parent
↓
parent
↓
parent
↓
parent
↓
...
The browser eventually hit:
ERR_TOO_MANY_REDIRECTS
The escalation worked, but the self-referencing project was broken. The researcher then asked whether the Enterprise state could be used without relying on the broken project.
Step 5: Use a clean child project
A separate project was used as the child. That clean child was added to the now-Enterprise parent through the same grouping functionality. After refreshing the child, it came back as:

The malformed self-reference did not have to be the end state: it acted as an Enterprise anchor, and a separate clean child inherited the Enterprise state.
Root cause
The researcher identifies two separate trust failures.
- The project graph accepts an invalid relationship. The backend should reject
child_project_id == parent_project_idand should also prevent circular project relationships more generally. - Enterprise entitlement is influenced by that graph. Enterprise state should come from an authoritative subscription or organisation entitlement, not effectively from
childrenProjects.
The dangerous pattern is that user-controlled project relationships influenced a security-sensitive authorisation decision. The application needed to answer whether a project actually had Enterprise entitlement, but the effective state could be changed by manipulating the project graph. A safer design would derive Enterprise features from billing or organisation entitlement through server-side authorisation, with the project graph only describing relationships.
Impact
A Free authenticated user could reach the project-grouping endpoint, have a self-reference accepted, and cause the project to become Enterprise after a refresh. The Enterprise dashboard became available, and a clean child project could inherit the Enterprise state. The researcher classified this as a privilege escalation and business-logic vulnerability because a lower-tier account obtained a higher-tier commercial entitlement without the normal purchase or provisioning path.
The researcher originally submitted the finding as Critical, based on the business impact of a free user obtaining an expensive commercial entitlement. The program accepted the report as:
HIGH SEVERITY
$1,000 BOUNTY

The researcher notes that a CVSS score measures technical security characteristics and does not perfectly capture whether a free user can obtain an expensive commercial entitlement, which is why the original argument for Critical was based on business impact while the program's final classification was High.
Fix
The report describes what should be fixed. The backend should reject a project being its own child and should prevent circular project relationships. Enterprise entitlement should come from an authoritative subscription or organisation entitlement and should not be derived from the project graph. The project graph can describe relationships, but it should not decide who has paid for Enterprise.
Variants to test
- Self-referencing relationships on other grouping endpoints. Send an object's own identifier as its parent, child, owner or member and check whether the relationship is accepted and persisted.
- Circular relationships beyond self-reference. Create a cycle between two or more objects and check whether the backend accepts it.
- Derived entitlement after relationship changes. After modifying a relationship, fetch the object again rather than trusting the mutation response.
- Inheritance through a clean child. Add a separate clean object to a parent whose state was manipulated and refresh the child.
- Relationship fields that feed authorisation. Test endpoints such as parent/child, owner/member, group/project and account/organisation/resource/entitlement where relationship data may be trusted by another subsystem.
The researcher's closing question is worth carrying into each test: not only whether an object can be modified, but whether a relationship can be modified that changes what the application believes the object is entitled to.
What happened, in plain words
A security researcher found a way to turn a free account into an Enterprise account on a project-management website, without paying. The trick was to tell the website that a project was its own child. The website accepted this, and after a page refresh the project was treated as an Enterprise project. The company running the bug bounty programme accepted the report as High severity and paid a $1,000 bounty.
This article walks through the whole thing slowly, assuming you have never done security testing before. You only need to know how to use a browser.
Some background first
Before the story, a few ideas that come up again and again.
A web application and its backend. When you use a website, you see pages and buttons. That is the frontend, the part your browser draws. Behind it sits a server, a computer somewhere else that stores the data and decides what is allowed. The frontend asks the server for information and the server answers. The frontend can be made to look like anything, so a security tester always wants to know what the server actually does, not what the screen shows.
An API. An API is the set of addresses (called endpoints) that the frontend uses to talk to the server. Think of a restaurant: the menu is the frontend, the kitchen is the server, and the waiter who carries your order back and forth is the API. Each endpoint has a name, like /api/projects/123/children, and a method, which is the verb saying what you want to do. GET means "give me something", PATCH means "change something".
A request and a response. A request is the message your browser sends to the server: the address, the method, some headers (extra labels with information), and sometimes a body (the actual data). A response is what comes back, usually with a status code: 200 means fine, 400 means you sent something the server did not like, 403 means you are not allowed.
JSON. A common way of writing data as text so both sides understand it. It uses curly braces {} for an object (a labelled bundle of values) and square brackets [] for a list. For example { "plan": "free" } means "the plan is free".
A token or cookie. When you log in, the server gives your browser a small piece of secret text. Your browser sends it back with every request so the server knows who you are. Without it, the server treats you as a stranger. In this story one such token appears in a request header, and it is redacted here because it is secret.
A plan and an entitlement. Many services sell tiers: Free, Pro, Enterprise. Your plan is what you bought. An entitlement is what the server believes you are allowed to use because of that plan. If the server's belief can be changed without paying, that is a serious problem.
Privilege escalation. This is the security term for getting more power than you should have. A simple example: a normal user somehow becomes an administrator. Here, a Free user becomes Enterprise.
Business-logic vulnerability. Most security bugs are technical, like a broken lock. A business-logic bug is different: every piece of code works as written, but the rules of the business can be bent. It is like a shop where the till correctly adds up prices, but nobody checks that the customer actually paid before handing over the goods.
A bug bounty programme. A company invites outside researchers to look for problems and pays for good reports. The researcher writes up what they found, the company reviews it, decides how serious it is, and pays a reward called a bounty.
The feature being tested
The website had a project-management feature. You could create projects, and Enterprise customers could group projects together: one parent project with other projects as its children. This grouping was meant to be Enterprise-only. The researcher's test account was on the Free plan, so the normal way of grouping projects was not available in the interface.
That raised the question that starts most good findings: what is the server actually checking? The screen hides the button, but does the server refuse the request too?
The starting point: a Free project
The researcher began with an ordinary Free project and asked the server directly what state it was in, so there was a clear record of the starting point:
plan: free
enterprise: false
Line by line: plan: free means the project belongs to the Free tier. enterprise: false means the Enterprise flag is off. Nothing here suggests any paid feature is active.

The screenshot is captioned as the initial project state.
The first attempt did not work
The grouping feature was supposed to be Enterprise-only. From a Free account, the normal child-project workflow was not available. Rather than assume the rule was enforced, the researcher wanted to check whether the server enforced it.
The endpoint behind the feature was:
PATCH /api/projects/<project>/children
Line by line: PATCH is the method meaning "change something". /api/projects/<project>/children is the address. <project> is a placeholder for the project's identifier, a unique code the server uses to tell projects apart. So the whole line means: change the list of children belonging to this project.
This endpoint accepts project IDs that are supposed to become children of the parent project. The obvious first test was to add another project as a child. From the Free account, that did not produce anything useful.
So the researcher changed the question.
The weird test
Every parent/child system rests on an assumption: a project cannot logically be its own child. It is so obvious that a developer may never write a check for it. That is exactly the kind of gap worth probing.
So the researcher took the project's own ID and sent it back as its own child. The request looked like this:
PATCH /api/projects/<project>/children
Content-Type: application/json
X-XSRF-TOKEN: <redacted>
Line by line: the first line is the method and address, as before. Content-Type: application/json is a header telling the server the body is written in JSON, so it knows how to read it. X-XSRF-TOKEN: <redacted> is a header carrying a secret token the site uses to confirm the request really came from its own pages; the value is hidden here because it is sensitive.
The body of the request was:
[
{ "_id": "<same-project-id>" }
]
Line by line: the outer square brackets [ ] mean "here is a list". Inside is one object { }. "_id" is the field name for an identifier. "<same-project-id>" is the same project ID that appears in the address. So the message says: "make this project a child of itself".
The researcher expected the server to refuse, with:
400 Bad Request
Line by line: 400 is the status code for "your request was malformed or not acceptable". It is the polite way for a server to say no.
Instead, the server accepted it. The response included the project's own ID in a field called childrenProjects. That means the relationship was not only accepted, it was saved. The relationship was not only accepted, it was saved.
At first, it looked like nothing happened
The immediate reply to the change still said:
plan: free
enterprise: false
Line by line: the plan is still Free and the Enterprise flag is still off. So at that moment it looked like the self-reference was just a strange database quirk with no security impact.
But there is a useful habit here. When a website changes something, the reply to that change is not always the same as what the website will show you next time you ask. The reply is a quick acknowledgement; the real state is worked out later, from the stored data. Security testers call this derived state: a value the server calculates rather than stores directly. So the researcher refreshed the page and asked again.
And that changed everything.

After the refresh, the same project reported:
plan: enterprise
enterprise: true
Line by line: the plan is now Enterprise and the Enterprise flag is on. The dashboard also showed an Enterprise Dashboard entry. After a fresh fetch, the same project reported:
plan = enterprise
enterprise = true
Line by line: the same result, this time from the server itself rather than the screen. So the change was not just a cosmetic label in the frontend. The server was treating the project as Enterprise.
The self-reference broke the project
There was a catch. Because the project was now its own child, the public documentation page followed that relationship over and over. Conceptually:
parent
↓
parent
↓
parent
↓
parent
↓
...
Line by line: each arrow means "leads to". The page followed the relationship over and over. The browser eventually gave up with:
ERR_TOO_MANY_REDIRECTS
Line by line: this is a browser error meaning "I have been sent round in circles too many times and I am stopping". The escalation worked, but the self-referencing project was now broken. The researcher wanted the Enterprise state without the broken project, so asked a new question: can the Enterprise state be used without relying on the broken project?
A clean child project
A separate project was used as the child. That clean child was added to the now-Enterprise parent through the same grouping functionality. After refreshing the child, it came back as:

So the malformed self-reference did not have to be the end state. It acted as an Enterprise anchor: a project whose state had been manipulated, from which a separate, clean child could inherit the Enterprise state.
What had actually been bypassed?
The real problem was not simply that a project was its own child. The deeper problem was this chain:
invalid project relationship
↓
trusted by entitlement logic
↓
Enterprise state
Line by line: an invalid relationship was created, the code that decides entitlements trusted it, and the result was Enterprise state. In other words, user-controlled project relationships were influencing a security-sensitive authorisation decision. That is a dangerous pattern. The application needed to answer "does this project actually have Enterprise entitlement?", but the effective answer could be changed by manipulating the project graph.
The boundary that was crossed looked like this:
Free authenticated user
↓
project grouping endpoint
↓
self-reference accepted
↓
Enterprise state becomes effective
↓
Enterprise dashboard
↓
clean child can inherit Enterprise state
Line by line: a logged-in Free user reached the grouping endpoint, the self-reference was accepted, the project became Enterprise, the Enterprise dashboard appeared, and a clean child could inherit the same state. That is why the researcher classified this as a privilege escalation and business-logic vulnerability, not just a validation bug.
Why it was submitted as Critical
The researcher originally submitted the finding as Critical. The reason was the boundary being crossed. This was not simply changing something inside a Free project. It was starting with Free and obtaining Enterprise without the normal purchase or provisioning path. From the researcher's perspective, that is a particularly serious class of business-impact bug, because the application is effectively giving a lower-tier account a higher-tier commercial entitlement. The payload itself was tiny; the boundary it crossed was not.
The programme's final assessment
The programme ultimately accepted the report as:
HIGH SEVERITY
$1,000 BOUNTY
Line by line: HIGH SEVERITY is the programme's rating of how serious the issue is. $1,000 BOUNTY is the reward paid to the researcher.

The researcher still sees an interesting distinction. A CVSS score is a standard number used to measure the technical characteristics of a vulnerability. It does not perfectly capture the question "can a free user obtain an expensive commercial entitlement?". That is why the original argument for Critical was based on business impact, while the programme's final classification was High. The hard part was not writing the payload; it was finding the trust relationship the payload could abuse.
How it was found
Looking back, the investigation was a chain of increasingly odd questions:
Project grouping is Enterprise-only
↓
What is the backend endpoint?
↓
Can a Free account reach it?
↓
Normal child association doesn't work
↓
What if the parent is its own child?
↓
Self-reference accepted
↓
Refresh
↓
Why is the plan now Enterprise?
↓
Can a clean child inherit it?
↓
Yes.
Line by line: each arrow is the next question the previous answer raised. The lesson the researcher draws is that interesting vulnerabilities often sit one layer below the feature people are actually using.
The root cause
There appear to be two separate trust failures.
1. The project graph accepts an invalid relationship
The backend should reject:
child_project_id == parent_project_id
Line by line: child_project_id is the identifier of the child, parent_project_id is the identifier of the parent, and == means "is the same as". So the line says: the server should refuse when a project is asked to be its own child. It should also prevent circular project relationships more generally, where two or more projects end up pointing at each other in a loop.
2. Enterprise entitlement is influenced by that graph
Even more importantly, Enterprise state should come from an authoritative subscription or organisation entitlement. It should not effectively become:
childrenProjects
↓
Enterprise
Line by line: the list of children should not be the thing that decides whether a project is Enterprise. A safer design is:
Billing / organization entitlement
↓
server-side authorization
↓
Enterprise features
Line by line: the record of what was actually paid for feeds the server's permission check, and only then are Enterprise features switched on. The project graph can describe relationships; it should not decide who has paid for Enterprise.
The lesson
This bug changed how the researcher thinks about relationship endpoints. An endpoint like /children looks harmless. But relationship data can become security-sensitive when another part of the system trusts it. That makes these worth testing carefully:
parent / child
owner / member
group / project
account / organization
resource / entitlement
Line by line: each pair is a kind of relationship a website might store. The point is that any of them could be trusted by some other part of the system. The question to ask is not only "can I modify this object?" but also "can I modify a relationship that changes what the application believes this object is entitled to?".
Final thoughts
The exploit was only a few lines. The investigation was the interesting part. The researcher started with a Free project and an Enterprise-only feature that could not normally be used, then tried something that looked almost too silly to matter:
[{ "_id": "<own-project-id>" }]
Line by line: a list containing one object, whose _id is the project's own identifier. That invalid relationship was accepted. After a refresh, a Free project had become Enterprise. The programme accepted the finding as High severity and awarded a $1,000 bounty. The lesson is how easily a small assumption in a project relationship could reach all the way up into the application's subscription boundary. Sometimes the weirdest test is the one worth sending.
Glossary
- API: the set of addresses a website's frontend uses to talk to its server.
- Backend: the server-side part of an application that stores data and decides what is allowed.
- Body: the part of a request that carries the actual data being sent.
- Bounty: a reward paid by a company for a useful security report.
- Bug bounty programme: a scheme where a company invites outside researchers to find and report security problems in exchange for rewards.
- Business-logic vulnerability: a flaw where the code works as written but the business rules can be bent, for example getting a paid feature without paying.
- Child project: a project that belongs under another project in a grouping.
- Circular relationship: a loop where objects point at each other, directly or indirectly, so following the links never ends.
- Content-Type: a request header that says what format the body is written in, such as JSON.
- Cookie: a small piece of data a website stores in your browser, often used to remember who you are.
- CVSS score: a standard number used to rate the technical severity of a vulnerability.
- Derived state: a value the server calculates from stored data rather than storing directly, so it can differ from the reply to the change that caused it.
- Endpoint: a specific address on a server that accepts requests, such as
/api/projects/123/children. - Entitlement: what the server believes an account or object is allowed to use, usually based on what was paid for.
- Frontend: the part of a website you see and interact with in your browser.
- GET: a request method meaning "give me something".
- Header: extra labelled information attached to a request or response.
- JSON: a text format for writing structured data, using
{}for objects and[]for lists. - Method: the verb in a request saying what you want to do, such as GET or PATCH.
- PATCH: a request method meaning "change something".
- Payload: the data sent in a request, especially the part crafted to trigger a bug.
- Plan: the tier of service an account has bought, such as Free or Enterprise.
- Privilege escalation: getting more access or power than you are supposed to have.
- Project graph: the network of relationships between projects, such as which project is the parent of which.
- Provisioning: the process of setting up a paid service for a customer after purchase.
- Redirect: an instruction from a server telling the browser to go to another address.
- Request: the message a browser sends to a server asking for something or asking to change something.
- Response: the message a server sends back, including a status code and usually some data.
- Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
- Status code: a number in a response saying how the request went, such as 200 for success or 400 for a bad request.
- Token: a piece of secret text used to prove who you are or that a request is genuine.
- X-XSRF-TOKEN: a header carrying a token a website uses to confirm a request came from its own pages.