The API would have handed me another worker's payouts. All it took was changing one id in the request.
I found it the boring way. The page showed disabled, terms violation, except the session was plainly still working. So I opened the network tab instead of closing the laptop.
A local trait still read active, a role flag sat on the wrong tier, and the call the dashboard is built on came back 200 OK with an empty body. No error, no 403. The front end turned that silence into a terms-violation screen.
The screen is downstream of the data
The client asks for the account's work, receives an empty list, and concludes the account is disabled. The server had decided that, but it never said so in a way that counts. Instead of a 403 with a reason, it returned 200 with an empty body and left the browser to infer the verdict from the absence of data. A security state read off the shape of a response is not an authorization decision (OWASP API5:2023, CWE-863). The red screen is paint, and the only question left is what the server does when the client stops cooperating.
Close it where it belongs
The fix is about where the decision lives. Account status is a server decision. Return a 403 with a signed reason, and let the client render what the server states instead of what it guesses. Role and entitlement belong in a signed claim the server issues and verifies, never in a cookie or a local trait the account holder can edit. Everything the browser sends is attacker-controlled by definition. The server is the only place a decision counts.
The part underneath
The disabled screen is the surface. The call beneath it keys its response on an identifier the client supplies, which is the precondition for broken object-level authorization (OWASP API1:2023, CWE-639). Hold the session constant, change the identifier, and whether one account reads another comes down to a single ownership check the endpoint may or may not run. That check is the finding. Its absence is worth more than any stolen credential, because it needs none.
I built the mechanism on a bench so the move reads end to end, without narration.
When the client is an agent
Swap the browser for an autonomous agent and both halves get worse. An agent that reads an empty 200 as a disabled account is trusting the shape of a tool's output as ground truth, the same mistake the front end made, now driving decisions instead of a screen. And a tool that keys on a model-supplied identifier is broken object-level authorization with a steering wheel attached. A prompt injection that says fetch the payments for someone else is a valid tool call unless the server refuses it. The capability to name the id was never the risk. The missing check on permission to receive it is.
A better system prompt does not close this. A monitor at the tool boundary does. It resolves permission from the acting session, serves only what that session owns, and records the over-ceiling attempt instead of discarding it, because that attempt is the most useful thing the agent will do all day. The lab's sixth case runs it: a steered tool argument reads another account on the vulnerable server, and draws a 403 and a logged escalation on the fixed one.
Run it yourself
The lab is on GitHub at ghostintheprompt/bola_says_who. Clone it, run npm test, read the two servers against each other.
The vulnerable handler confirms only that you are logged in as someone, then answers for whatever id you pass it:
app.get('/api/profile/:profileId', requireAuth(state), (req, res) => {
const profile = Object.hasOwn(state.profiles, req.params.profileId)
? state.profiles[req.params.profileId]
: null;
if (!profile) return res.status(404).json({ error: 'not found' });
res.json({ email: profile.email, unpaidEarnings: profile.unpaidEarnings });
// never checks that profile.ownerId === req.userId
});
The fixed handler is the same code with one line standing in front of the answer:
if (profile.ownerId !== req.userId) {
return res.status(403).json({ error: 'forbidden' });
}
Log in as one worker, request another worker's id. The vulnerable server returns their email and unpaid earnings. The fixed server returns 403. One ownership check is the entire boundary.
Named for the record: a Broken Object-Level Authorization read (IDOR/BOLA, OWASP API1:2023, CWE-639), fronted by account status signaled as data instead of a decision (CWE-602), and reachable through an agent tool a prompt injection can steer. Three labels, one missing check.
The transit work found the object reference. This one found the screen in front of it, insisting the door was locked while the server was still answering. Same class, one layer up.
GhostInThePrompt.com // The request should never get to say who you are. Give the session the last word.