Low-privileged user can enable or disable Lovable AI for new projects in workspace
Originally disclosed on HackerOne
- Triaged in 42 hours
- Fixed in 48 hours
- Disclosed after 34 days
Hello team, I hope this report finds you well.
On lovable.dev, low-privileged user can enable or disable Lovable AI for new projects in workspace. During testing, I found improper authorization vulnerability that allows low privileged user to modify Lovable AI settings. Here's the steps to reproduce.
Steps To Reproduce:
- Get the endpoint to enable and disable Lovable AI for new projects in your own workspace
- Now, replay that endpoint on another workspace with low-privileged role
<!-- To enable -->
DELETE /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
<!-- To disable -->
POST /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
{
"approval_preference":"disable"
}
I have provided a video POC to demonstrate this.
Video PoC
For log review:
X-Hackerone-Research: anxioussick
Impact
Unauthorized enable or disable Lovable AI for new projects in workspace
What the report shows
The target is lovable.dev, and the feature in question is the Lovable AI setting that controls whether AI is enabled for new projects in a workspace. The researcher reports an improper authorization issue: a low-privileged user can enable or disable Lovable AI for new projects in a workspace they should not be able to change.
The reproduction is short. The reproduction says to get the endpoint that enables and disables Lovable AI for new projects in your own workspace, then replay it on another workspace with a low-privileged role. The two requests are given as follows:
<!-- To enable -->
DELETE /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
<!-- To disable -->
POST /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
{
"approval_preference":"disable"
}
The report labels the DELETE request as the one that enables the feature and the POST with an approval_preference body value of disable as the one that disables it. The workspace is selected by the <workspace_id> path segment, which is the part the researcher swapped when replaying the request against the other workspace.
The researcher recorded a video proof of concept demonstrating the behaviour.
For log review, the researcher supplied the following header value so the requests could be correlated in the target's logs:
X-Hackerone-Research: anxioussick
The report states the impact as unauthorised enable or disable of Lovable AI for new projects in a workspace. It is filed under the Lovable VDP with a low severity and the weakness Improper Authorization. The report does not describe a fix, and no bounty is recorded.
Root cause
The report does not describe a root cause. The request identifies the workspace only through the <workspace_id> path segment, and the server appears to act on that identifier without verifying that the caller holds a role in that workspace which permits changing workspace-level tool preferences.
Impact
The effect is limited to one setting: whether Lovable AI is enabled for new projects in a workspace. A low-privileged user can enable or disable that setting in another workspace. The report does not claim access to project data, code, secrets or other workspace configuration, and none should be inferred. The practical consequence is a configuration integrity issue: workspace owners lose control over a workspace-level preference, and the change may affect how new projects in that workspace behave.
How this kind of bug works
This is a broken object-level or function-level authorization problem. The application has a legitimate endpoint that changes state. What it fails to do is bind the action to the caller's rights over the specific object named in the request. Two checks are typically relevant: whether the caller belongs to the workspace referenced in the path, and whether the caller's role within that workspace is allowed to perform this particular action.
The bug class is common wherever identifiers are client-supplied and resources are shared between users or tenants. Endpoints that mutate settings are especially attractive because the request already carries everything needed to name the victim object, and the response often confirms success. Defences are straightforward in principle: enforce object ownership on every request, check the role required for the specific operation rather than only requiring login, and avoid trusting path or body identifiers without resolving them against the caller's memberships.
How to test for it
- Create two accounts, or two workspaces, and give the second account a low-privileged role in the first workspace if the product supports invitations and roles.
- With the privileged account, perform the state-changing action and capture the request: method, path, body and any identifiers.
- Identify the object identifier in the request, such as a workspace, project or team ID.
- Replay the same request with the low-privileged account's session, substituting the identifier of the workspace where that account has limited rights.
- Observe whether the server applies the change. Confirm by reading the setting back through the UI or a GET request as the privileged account, not only by the status code of the replay.
A positive result is a successful state change on an object the caller should not control, ideally visible to the owner. Test both directions where the endpoint supports them, since an enable and a disable path may be guarded differently. Also try removing or downgrading the role entirely, and try identifiers belonging to a workspace the account has no membership in at all.
Common false positives: the endpoint may return a success status while silently ignoring the change; the low-privileged role may legitimately include this permission; the setting may be per-user rather than per-workspace, in which case changing it affects only the caller; or the application may apply the change but revert it on the next read. Always verify the persisted state from the victim's perspective.
How it is fixed
The standard fix is to resolve the workspace identifier from the request, load the caller's membership and role for that workspace, and reject the request unless the role permits the operation. This check belongs in the server-side handler or a shared authorization layer, not in the client. Returning a generic forbidden response for both missing membership and insufficient role avoids leaking which workspaces exist. Logging the actor, the target workspace and the action helps detect abuse, and regression tests should cover each role against each state-changing endpoint.
Hunting notes
Settings and preference endpoints are a good place to look, because they are often added later than core resource endpoints and may miss the authorization pattern used elsewhere. Path segments that name a tenant, workspace or team are the strongest signal: wherever an identifier appears in the path of a mutating request, ask whether the server checks the caller against it. Recon should map which roles exist, what each can do in the UI, and which requests the UI issues for those actions; the gap between what the UI hides and what the API accepts is where these bugs live.
To make the report land, show the before and after state from the owner's view, name the exact role of the attacking account, and keep the proof minimal and reproducible. A short video or paired screenshots of the setting changing, plus the request that caused it, is usually enough for a low-severity configuration issue.
What happened, in plain words
Lovable is a website (lovable.dev) where people build software projects, and it has a feature called Lovable AI that can be switched on or off for new projects inside a workspace. A workspace is a shared area where a group of people work on projects together, a bit like a shared folder that several people can open. The researcher found that a user with a low-privileged role, meaning someone with only basic rights in that workspace, could still change this Lovable AI setting. That user should not have been able to touch it.
To understand the problem, you need one idea: every time you click something on a website, your browser sends a request to the server. A request is simply a message that says what you want to do, for example "turn this setting on". The server checks who you are, usually through a session, which is like a wristband you get when you log in and show on every later visit. The bug here is that the server checked the wristband but did not check whether you were allowed to change that particular workspace's setting.
The reproduction has two steps. First, get the request that turns Lovable AI on and off in your own workspace. Second, replay that request on another workspace with a low-privileged role. The report states the impact as unauthorised enable or disable of the setting. The two requests look like this:
<!-- To enable -->
DELETE /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
<!-- To disable -->
POST /workspaces/<workspace_id>/tool-preferences/ai_gateway/enable
{
"approval_preference":"disable"
}
Line by line:
DELETE /workspaces/<workspace_id>/tool-preferences/ai_gateway/enableis the request that turns the feature on.DELETEis the method, the verb that tells the server what kind of action to take; the report labels this request as the one that enables the feature. The path names the workspace through<workspace_id>, which is a placeholder for the real workspace number or name. The rest of the path points at the AI gateway setting.POST /workspaces/<workspace_id>/tool-preferences/ai_gateway/enableis the request that turns it off.POSTis another method, normally used to send data to the server. It goes to the same path.{"approval_preference":"disable"}is the body, the small piece of data sent with the POST. It tells the server the preference should bedisable.
The important part is <workspace_id>. When the researcher replayed the request, they swapped that value for the identifier of the other workspace.
The researcher recorded a video proof of concept showing the behaviour.
They also added a header so the requests could be found in the target's logs:
X-Hackerone-Research: anxioussick
A header is extra information attached to a request, like a note on an envelope. This one carries the researcher's handle so the site's team can search their logs and match the requests to the report.
The impact is stated as unauthorised enable or disable of Lovable AI for new projects in a workspace. The report does not describe a fix, and no bounty is recorded. It was filed under the Lovable VDP, a vulnerability disclosure programme, with a low severity and the weakness Improper Authorization.
In general, how this kind of bug works
This is a broken authorization problem. Authorization means deciding what a logged-in person is allowed to do. Authentication, by contrast, only proves who you are. A useful comparison is a hotel: your key card proves you are a guest (authentication), but it should only open your own room, not every room on the floor (authorization).
Here the application has a real endpoint, a web address that performs an action. What it fails to do is check your rights over the specific workspace named in the request. Two checks are typically missing: whether you belong to that workspace at all, and whether your role there allows this particular change.
This bug class appears wherever identifiers are supplied by the client and resources are shared between people. Settings endpoints are especially attractive because the request already contains everything needed to name someone else's workspace, and the response often confirms success. The defences are simple in principle: check ownership on every request, check the role needed for the specific action rather than only requiring a login, and never trust an identifier from the path or body without matching it against the caller's memberships.
How to test for it
- Create two accounts, or two workspaces, and give the second account a low-privileged role in the first workspace if the product supports invitations and roles.
- With the privileged account, perform the state-changing action and capture the request: method, path, body and any identifiers.
- Identify the object identifier in the request, such as a workspace, project or team ID.
- Replay the same request with the low-privileged account's session, substituting the identifier of the workspace where that account has limited rights.
- Observe whether the server applies the change. Confirm by reading the setting back through the UI or a GET request as the privileged account, not only by the status code of the replay.
A positive result is a successful state change on an object the caller should not control, ideally visible to the owner. Test both directions where the endpoint supports them, since an enable and a disable path may be guarded differently. Also try removing or downgrading the role entirely, and try identifiers belonging to a workspace the account has no membership in at all.
Common false positives: the endpoint may return a success status while silently ignoring the change; the low-privileged role may legitimately include this permission; the setting may be per-user rather than per-workspace, in which case changing it affects only the caller; or the application may apply the change but revert it on the next read. Always verify the persisted state from the victim's perspective.
How it is fixed
The standard fix is to resolve the workspace identifier from the request, load the caller's membership and role for that workspace, and reject the request unless the role permits the operation. This check belongs in the server-side handler or a shared authorization layer, not in the client. Returning a generic forbidden response for both missing membership and insufficient role avoids leaking which workspaces exist. Logging the actor, the target workspace and the action helps detect abuse, and regression tests should cover each role against each state-changing endpoint.
Hunting notes
Settings and preference endpoints are a good place to look, because they are often added later than core resource endpoints and may miss the authorization pattern used elsewhere. Path segments that name a tenant, workspace or team are the strongest signal: wherever an identifier appears in the path of a mutating request, ask whether the server checks the caller against it. Recon should map which roles exist, what each can do in the UI, and which requests the UI issues for those actions; the gap between what the UI hides and what the API accepts is where these bugs live.
To make the report land, show the before and after state from the owner's view, name the exact role of the attacking account, and keep the proof minimal and reproducible. A short video or paired screenshots of the setting changing, plus the request that caused it, is usually enough for a low-severity configuration issue.
Glossary
- Workspace: a shared area where a group of people work on projects together.
- Lovable AI: the feature whose on/off setting for new projects is the subject of the report.
- Request: a message your browser sends to a server asking it to do something.
- Endpoint: a specific web address that performs an action on the server.
- Session: the state of being logged in, usually carried by a cookie or token so the server recognises you on later requests.
- Cookie: a small piece of data a site stores in your browser and sends back with each request.
- Token: a value that proves your identity or permission, often sent with requests.
- Header: extra information attached to a request, such as a note on an envelope.
- Method: the verb in a request, such as GET, POST or DELETE, telling the server what kind of action to take.
- Body: the data sent along with a request, such as a small JSON object.
- JSON: a simple text format for structured data, using curly braces and key/value pairs.
- Path: the part of a web address after the domain, naming the resource being acted on.
- Identifier (ID): a number or name that uniquely points to an object, such as a workspace.
- Authentication: proving who you are, for example by logging in.
- Authorization: deciding what a logged-in person is allowed to do.
- Improper Authorization: a weakness where the server does not correctly check permissions.
- Role: a label such as owner or member that defines what a user may do in a workspace.
- Low-privileged user: a user with only basic rights, not an owner or administrator.
- State change: an action that alters stored data, such as switching a setting on or off.
- Replay: sending a captured request again, sometimes with a value changed.
- Proof of concept (PoC): a demonstration that the bug really works, often a video or screenshots.
- VDP: vulnerability disclosure programme, a scheme for reporting security issues to a company.
- Severity: a rating of how serious a bug is, here low.
- False positive: a result that looks like a bug but is not one.
- Regression test: an automated test that checks a fixed bug stays fixed.