Skip to content
Access control Disclosed report Beginner

Improper Authorization Leads to Editor can toggle admin-only workspace features (Lovable Cloud)

An Editor-level account could call a workspace API endpoint that toggles the admin-only Lovable Cloud feature, because the server did not check the caller's role. An attacker with only Editor rights could switch the feature off for the whole workspace, disrupting backend services for all projects and users.

oxdoma Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 7 hours
  • Disclosed after 30 days

Summary:

An account with the Editor role can successfully call the API endpoint /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable that disables workspace-wide admin-only features (Lovable Cloud). The API does not enforce server-side role checks for this action, allowing a vertical privilege escalation (Broken Access Control).

Steps To Reproduce:

Preconditions

  • Two accounts are members of the same workspace Victim-Workspace:

    • Account A (Owner/Admin) - Owner role in Victim-Workspace.
    • Account B (Editor) - Editor role in the same Victim-Workspace.
  1. Sign in as Account A (Admin) and toggle the Cloud feature off inside the workspace.

  2. Capture this endpoint (Responsible for Disabling Cloud Feature).

HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <OWNER-JWT>
Content-Type: application/json


{"approval_preference":"disable"}

Note: <WORKSPACE_ID> is the workspace id for Victim-Workspace.

  1. Modify request to use Editor JWT Token
  • Replace the Authorization header with Account B (Editor) JWT:
HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <EDITOR_JWT>
Content-Type: application/json

{"approval_preference":"disable"}
  1. When the request is sent again with the Editor's JWT , the request succeeds and the Lovable Cloud setting is switched off for the workspace.

Proof of Concept :

Lovable_Cloud_Feature_POC.mp4 From the original on HackerOne

Impact

An Editor can disable the Lovable Cloud feature, which powers the workspace’s backend as mentioned in documentation (database, auth, storage, and serverless functions). This can lead to workspace-wide downtime and broken functionality for all projects and users, making the impact High due to the potential service disruption and business damage.

The original report as published on HackerOne, by oxdoma. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Lovable Cloud is a workspace-level feature that provides the backend for a workspace's projects: the report describes it as covering database, auth, storage and serverless functions, as documented by the vendor. Because it underpins every project in a workspace, turning it off is an administrative action, and the workspace UI treats it as such: only an Owner or Admin is expected to be able to toggle it.

The toggle is driven by an API call to the lovable-api.com host, on the path /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable, with a JSON body carrying an approval_preference value. The report's finding is that this endpoint authorises the caller by their token alone and does not check the caller's role in the workspace server-side, so a member with the Editor role can perform the same state change as an Owner.

Setup

The precondition is a single workspace, referred to in the report as Victim-Workspace, with two accounts as members:

Account Role in Victim-Workspace
Account A Owner (Owner/Admin)
Account B Editor

Both accounts are legitimate members of the same workspace. The researcher captures the Owner's request and replays it with the Editor's credentials. No special tooling is named beyond the ability to intercept and modify HTTP requests and to capture the result on video.

Finding it

The starting observation is that the Cloud toggle is presented as an admin-only, workspace-wide setting, yet the request that performs it is a plain authenticated API call whose only identity signal is the bearer token in the Authorization header. Nothing in the request body identifies the role of the caller, and the workspace is identified only by the <WORKSPACE_ID> in the path. That shape invites the question of whether the server checks the caller's membership role at all, or merely that the caller is a member of the workspace. The researcher tested the second possibility by replaying the Owner's request with the Editor's token.

Exploitation

Step 1: turn the feature off as the Owner

Sign in as Account A (Admin) and toggle the Cloud feature off inside the workspace. This produces the request that the application itself sends when an authorised user disables the feature.

Step 2: capture the disabling request

The captured request is:

HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <OWNER-JWT>
Content-Type: application/json

{"approval_preference":"disable"}

The path scopes the action to a single workspace via <WORKSPACE_ID>, which the report notes is the workspace id for Victim-Workspace. The Authorization header carries the Owner's JWT, and the JSON body sets approval_preference to disable, which is the value that switches the Cloud feature off.

Step 3: swap in the Editor's token

Modify the request to use the Editor's JWT: replace the Authorization header with Account B's token, leaving the path, host, content type and body unchanged.

HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <EDITOR_JWT>
Content-Type: application/json

{"approval_preference":"disable"}

Step 4: send it and observe the result

When the request is sent again with the Editor's JWT, it succeeds, and the Lovable Cloud setting is switched off for the workspace. The server accepted a state change reserved for Owners and Admins from a caller holding only the Editor role.

Lovable_Cloud_Feature_POC.mp4 From the original on HackerOne

The video is the proof of concept, Lovable_Cloud_Feature_POC.mp4, showing the replay of the request with the Editor token and the resulting change to the workspace's Cloud setting.

Root cause

The endpoint authenticates the caller (a valid JWT is required) but does not enforce a server-side role check for the action. Authorisation appears to stop at workspace membership: any member's token is accepted for a workspace-scoped tool preference, regardless of whether that member is an Owner, Admin or Editor. The API does not repeat the role restriction server-side, so an Editor's token is accepted for the action. This is a vertical privilege escalation, classified in the report as Broken Access Control / Improper Authorization.

Impact

An Editor can disable the Lovable Cloud feature for the whole workspace. Since that feature powers the workspace's backend (database, auth, storage and serverless functions), the report states this can lead to workspace-wide downtime and broken functionality for all projects and users in it. The researcher argues the impact is High because of the potential service disruption and business damage, while the report is recorded with a low severity.

Fix

The report does not describe a fix or a vendor response.

Variants to test

  1. Other workspace-level tool preferences. Try the same token swap on sibling preference endpoints under /workspaces/<WORKSPACE_ID>/tool-preferences/.... A positive result is a 2xx response and a visible change in workspace settings when the request carries an Editor token.
  2. The inverse value. Send {"approval_preference":"enable"} with an Editor token. A positive result is the feature being switched back on by a non-admin, which shows the missing check applies to both directions.
  3. Cross-workspace attempts. Use an Editor token from one workspace against the <WORKSPACE_ID> of another workspace the account does not belong to. A positive result is any state change, which would indicate the membership check is missing as well as the role check.
  4. Role downgrades and removals. Capture an admin request, then have the account demoted to Editor or removed from the workspace, and replay the old token. A positive result is the request still succeeding after the role change.
  5. Other admin-only workspace actions. Apply the same capture-and-swap pattern to member management, billing or integration settings. A positive result is any admin-only action completing with an Editor token.

Hunting notes

This class of bug tends to sit in endpoints that are scoped by an object identifier in the path (here a workspace id) and authorised only by a bearer token, especially where the UI hides the control from lower-privileged roles. The signal during recon is a request whose body carries a simple preference or toggle value and whose only identity material is the Authorization header: if the server never sees the role in the request, the role check has to happen server-side, and that is exactly what is worth testing.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

Lovable is a service that helps people build software. Inside Lovable, a workspace is a shared area where a team keeps its projects. A workspace has members, and each member has a role that says what they are allowed to do. In this report there are two roles that matter: an Owner (also called Admin) can change workspace-wide settings, and an Editor is a normal member who should not be able to change those settings.

One of those settings is Lovable Cloud. According to the report, Lovable Cloud is the part of the service that provides the backend for the workspace's projects: the database, authentication, storage and serverless functions. In everyday terms, it is the engine room behind every project in the workspace. Turning it off is an administrative action.

But the web page is not the only way to talk to Lovable. Behind the page there is an API: a set of addresses (called endpoints) that the page calls to read and change data. The report found that the API endpoint which turns Lovable Cloud off does not check the caller's role on the server. It only checks that the caller is logged in with a valid token. So an Editor can send the same request directly and turn Cloud off for the whole workspace.

This kind of bug is called Broken Access Control, or Improper Authorization. The system knows who you are (that is authentication) but does not check whether you are allowed to do what you are asking (that is authorization). The report calls it a vertical privilege escalation, because a lower-privileged user reaches up to do something reserved for a higher-privileged one.

Context

Lovable Cloud is a workspace-level feature. The report describes it as covering the database, auth, storage and serverless functions of a workspace's projects, as documented by the vendor. Because every project in the workspace depends on it, turning it off is an administrative action, and the workspace UI treats it that way: only an Owner or Admin is expected to be able to toggle it.

The toggle is driven by an API call to the lovable-api.com host, on the path /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable, with a JSON body carrying an approval_preference value. The report's finding is that this endpoint authorises the caller by their token alone and does not check the caller's role in the workspace server-side, so a member with the Editor role can perform the same state change as an Owner.

A few of those words may be new:

  • API: the set of URLs a web page uses to talk to the server. Think of a restaurant: the menu is the API, the kitchen is the server, and your order is the request. You can order anything on the menu, whether or not the kitchen thinks you should have it.
  • Endpoint: one specific address on that API, for example the one that turns Cloud on or off.
  • JSON body: the small piece of data sent with a request, written in a format both sides understand. Here it is a single setting and its value.
  • Token (JWT): a long string the server gives you when you log in. Your browser sends it with every request so the server knows who you are. A JWT (JSON Web Token) is one common kind of token. Think of it as a wristband at an event: it proves you got in, but by itself it does not say which rooms you may enter.
  • Authorization header: the part of the request where the token travels. It looks like Authorization: Bearer <token>.
  • Server-side check: a rule enforced by the server itself, not by the web page. If the rule only exists in the page, anyone who talks to the API directly can skip it.

Setup

The precondition is a single workspace, referred to in the report as Victim-Workspace, with two accounts as members:

Account Role in Victim-Workspace
Account A Owner (Owner/Admin)
Account B Editor

Both accounts are legitimate members of the same workspace. The researcher captures the Owner's request and replays it with the Editor's credentials. No special tooling is named beyond the ability to intercept and modify HTTP requests and to capture the result on video.

Why two accounts? Because the test is a comparison. You first record what a privileged user's request looks like, then you send the same request as a less privileged user and see whether the server treats them differently. If it does not, the role check is missing.

Finding it

The starting observation is that the Cloud toggle is presented as an admin-only, workspace-wide setting, yet the request that performs it is a plain authenticated API call whose only identity signal is the bearer token in the Authorization header. Nothing in the request body identifies the role of the caller, and the workspace is identified only by the <WORKSPACE_ID> in the path. That shape invites the question of whether the server checks the caller's membership role at all, or merely that the caller is a member of the workspace. The researcher tested the second possibility by replaying the Owner's request with the Editor's token.

In plain terms: the request says which workspace to change and which token is asking. It never says "I am an Owner". So the server has to look up the role itself. If it forgets to, any member's token will do.

Exploitation

Step 1: turn the feature off as the Owner

Sign in as Account A (Admin) and toggle the Cloud feature off inside the workspace. This produces the request that the application itself sends when an authorised user disables the feature.

Why this step? To get a genuine, working example of the request. You are not guessing the format; you are copying what the real page sends when a permitted user does the action.

Step 2: capture the disabling request

The captured request is:

HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <OWNER-JWT>
Content-Type: application/json

{"approval_preference":"disable"}

Line by line:

  • POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2: this is the request line. POST means "I am sending data to change something". The path names the workspace (<WORKSPACE_ID>) and the setting (tool-preferences/supabase/enable). HTTP/2 is the version of the web protocol used.
  • Host: lovable-api.com: the server the request is addressed to.
  • Authorization: Bearer <OWNER-JWT>: the Owner's token, which tells the server who is asking. Bearer simply means "the token follows".
  • Content-Type: application/json: tells the server the body is in JSON format.
  • The empty line separates the headers from the body.
  • {"approval_preference":"disable"}: the body. It sets one preference, approval_preference, to disable, which is the value that switches the Cloud feature off.

The path scopes the action to a single workspace via <WORKSPACE_ID>, which the report notes is the workspace id for Victim-Workspace.

Step 3: swap in the Editor's token

Modify the request to use the Editor's JWT: replace the Authorization header with Account B's token, leaving the path, host, content type and body unchanged.

HTTPS
POST /workspaces/<WORKSPACE_ID>/tool-preferences/supabase/enable HTTP/2
Host: lovable-api.com
Authorization: Bearer <EDITOR_JWT>
Content-Type: application/json

{"approval_preference":"disable"}

Line by line:

  • The request line is identical to the Owner's. The same workspace and the same setting are targeted.
  • Host is identical: the same API server.
  • Authorization: Bearer <EDITOR_JWT> is the only change. The token now belongs to Account B, the Editor.
  • Content-Type is identical.
  • The body is identical: {"approval_preference":"disable"}.

Why change only the token? Because that isolates the question. If the request succeeds with the Editor's token, the difference between the two callers is only their role, so the server must be ignoring the role. Changing anything else would muddy the result.

Step 4: send it and observe the result

When the request is sent again with the Editor's JWT, it succeeds, and the Lovable Cloud setting is switched off for the workspace. The server accepted a state change reserved for Owners and Admins from a caller holding only the Editor role.

Lovable_Cloud_Feature_POC.mp4 From the original on HackerOne

The video is the proof of concept, Lovable_Cloud_Feature_POC.mp4, showing the replay of the request with the Editor token and the resulting change to the workspace's Cloud setting.

Root cause

The endpoint authenticates the caller (a valid JWT is required) but does not enforce a server-side role check for the action. Authorisation appears to stop at workspace membership: any member's token is accepted for a workspace-scoped tool preference, regardless of whether that member is an Owner, Admin or Editor. The API does not repeat the role restriction server-side, so an Editor's token is accepted for the action. This is a vertical privilege escalation, classified in the report as Broken Access Control / Improper Authorization.

A useful comparison: a hotel key card that opens the front door for any guest is fine, but the same card should not open the manager's office. Here the card (the token) is checked, but the office door (the role check) is missing.

Impact

An Editor can disable the Lovable Cloud feature for the whole workspace. Since that feature powers the workspace's backend (database, auth, storage and serverless functions), the report states this can lead to workspace-wide downtime and broken functionality for all projects and users in it. The researcher argues the impact is High because of the potential service disruption and business damage, while the report is recorded with a low severity.

Fix

The report does not describe a fix or a vendor response.

Variants to test

  1. Other workspace-level tool preferences. Try the same token swap on sibling preference endpoints under /workspaces/<WORKSPACE_ID>/tool-preferences/.... A positive result is a 2xx response and a visible change in workspace settings when the request carries an Editor token.
  2. The inverse value. Send {"approval_preference":"enable"} with an Editor token. A positive result is the feature being switched back on by a non-admin, which shows the missing check applies to both directions.
  3. Cross-workspace attempts. Use an Editor token from one workspace against the <WORKSPACE_ID> of another workspace the account does not belong to. A positive result is any state change, which would indicate the membership check is missing as well as the role check.
  4. Role downgrades and removals. Capture an admin request, then have the account demoted to Editor or removed from the workspace, and replay the old token. A positive result is the request still succeeding after the role change.
  5. Other admin-only workspace actions. Apply the same capture-and-swap pattern to member management, billing or integration settings. A positive result is any admin-only action completing with an Editor token.

Hunting notes

This class of bug tends to sit in endpoints that are scoped by an object identifier in the path (here a workspace id) and authorised only by a bearer token, especially where the UI hides the control from lower-privileged roles. The signal during recon is a request whose body carries a simple preference or toggle value and whose only identity material is the Authorization header: if the server never sees the role in the request, the role check has to happen server-side, and that is exactly what is worth testing.

Glossary

  • API: the set of addresses a web page uses to talk to a server, like a menu you can order from.
  • Endpoint: one specific address on an API, for example the one that turns a setting on or off.
  • Workspace: a shared area in Lovable where a team keeps its projects and members.
  • Role: a label on a member that says what they are allowed to do, such as Owner, Admin or Editor.
  • Owner/Admin: a member with administrative rights over a workspace.
  • Editor: a normal member who should not be able to change workspace-wide settings.
  • Lovable Cloud: the workspace feature that provides the backend for its projects: database, auth, storage and serverless functions.
  • Backend: the part of a service that runs on the server and stores and processes data, as opposed to the page you see.
  • Database: where an application stores its data.
  • Auth (authentication): the process of proving who you are, usually by logging in.
  • Storage: where an application keeps files.
  • Serverless functions: small pieces of code the service runs on demand on its servers.
  • Authentication: checking who the caller is.
  • Authorization: checking whether the caller is allowed to do what they are asking.
  • Broken Access Control / Improper Authorization: a bug where the system does not correctly enforce who may do what.
  • Vertical privilege escalation: a lower-privileged user performing an action reserved for a higher-privileged user.
  • Token: a string given at login that the browser sends with requests to identify you.
  • JWT (JSON Web Token): a common format for such a token.
  • Authorization header: the part of a request that carries the token, in the form Authorization: Bearer <token>.
  • Bearer: a word meaning the token follows in the header.
  • Header: a line of metadata sent with a request, such as the host or the token.
  • Body: the data sent with a request, here a small JSON object.
  • JSON: a text format for structured data, using curly braces and quoted names.
  • POST: an HTTP method meaning "send data to change something".
  • HTTP/2: a version of the protocol browsers and servers use to exchange requests and responses.
  • Host: the server name a request is addressed to.
  • Content-Type: a header saying what format the body is in.
  • 2xx response: an HTTP status code in the 200s, meaning the server accepted the request.
  • Server-side check: a rule enforced by the server itself, which cannot be skipped by using the API directly.
  • Client-side: anything that happens in the browser or page, which the user can bypass.
  • Recon: the exploration phase of a security test, looking for interesting requests and behaviour.
  • Proof of concept (PoC): a demonstration that the bug really works, often a video or screenshots.

More by oxdoma

View all

1 more disclosed report, best first.

More from Lovable VDP

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.