Skip to content
Access control Write-up Beginner

How One AI Feature Exposed Data from Multiple Restricted Functions

A support-level user was blocked from several features, including an AI Artifacts function, but the Artifacts listing and detail endpoints did not enforce that restriction. The user could list artifact identifiers and then fetch each artifact's full contents, which could include data drawn from other restricted features.

hs942422 Follow

Published on medium.com

Bug Bounty

Hassan saad, on medium.com

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.

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. 3 min read.

Context

RandomService.com is presented as a company that provides services to e-commerce store owners. A store owner signs up, connects their store, and gets access to a set of services that includes business analytics, data organisation and customer support.

Within that product there is a Support Agent role. The role is meant to cover the work support staff do: replying to customers and resolving their issues. Because of that, the role is restricted from several features, including marketing campaigns, the Flows section, and some of the AI Agent services the company uses internally.

One of the AI features restricted to Support Agents is the Artifacts function. An Artifact is the output an AI Agent generates after completing a task. The examples given are an admin creating an Artifact to collect the company's financial activity over a period, or to generate a summary of the company's latest marketing campaigns.

From the original on medium.com

Setup

The write-up describes the situation in general terms rather than listing tooling or versions. The precondition is an account holding the Support Agent role on RandomService.com, a role that is not supposed to reach the Artifacts feature at all. No other accounts, tools or version numbers are given.

Finding it

The starting point is the restriction itself: a Support Agent is blocked from marketing campaigns, from Flows, and from some internal AI Agent services, Artifacts among them. The researcher's idea was to map how the different functions relate to each other rather than to attack any single one in isolation.

That mapping produced the key observation: one of the restricted functions collects information from the other restricted functions. In the write-up this is expressed abstractly as Function 3 collecting information from Function 1 and Function 2. Applied to this product, the Artifacts function is the one that aggregates output produced elsewhere, which is exactly why an Artifact can contain financial activity or a summary of marketing campaigns.

So even though the member cannot reach the underlying features directly, anything that lets them read Artifacts gives them a path to information originating in those features.

Exploitation

Step 1: list the Artifacts

The researcher requested the Artifacts collection endpoint:

HTTP
GET api/artifacts

The response reveals the ID of each Artifact. The write-up does not show the response body, only that it contains the identifiers.

Step 2: fetch a single Artifact by ID

With an ID in hand, the member requests the individual Artifact:

HTTP
GET api/artifacts/ID

This returns the full contents of the selected Artifact. Those contents may include sensitive information the restricted member is not supposed to access.

The two steps together are the whole exploit: enumerate, then read. The write-up does not describe any additional headers, parameters or bypass technique.

Root cause

The issue is an access control mistake in the Artifacts function. The function is meant to be reachable only by users who are allowed to use it, and the admin's Artifacts are described as publicly accessible to those permitted users. A Support Agent, who is not among them, can still call both the collection endpoint and the per-ID endpoint and receive the data.

What makes the bug more than a single missing check is the data flow. Because the Artifacts function aggregates output from other restricted functions, a permission failure here leaks information that the role was separately denied at the source.

Impact

A member holding the restricted Support Agent role can retrieve every Artifact that an admin has made accessible to permitted users. Through those Artifacts they can reach information that originates in features they cannot access directly, such as financial activity over a period or summaries of marketing campaigns. The exposure is bounded by what has been published as an Artifact and by the fact that the attacker needs a valid account with the restricted role; the write-up does not quantify the number of affected Artifacts or records.

Fix

The fix it points to is enforcing the role restriction on the Artifacts endpoints themselves, both the collection listing and the per-ID retrieval, so that a Support Agent receives no Artifact data regardless of what the UI exposes.

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. 10 min read.

What happened, in plain words

A company runs a website that helps online shop owners manage their stores. The website has different kinds of user accounts, and each kind is allowed to do different things. One kind of account, the Support Agent, is meant to answer customers and fix their problems, and nothing more. It is deliberately blocked from several parts of the product, including an AI feature called Artifacts.

An Artifact is simply the result an AI helper produces after it finishes a job. For example, an administrator might ask the AI to gather the company's financial activity over a period, or to summarise the latest marketing campaigns. Those results are stored, and they can contain information that a Support Agent should never see.

The researcher found that a Support Agent account could still ask the website for the list of Artifacts and then read any of them in full. The Support Agent account could still send the requests and receive the data. Because Artifacts are built from data that lives in other restricted areas, reading them gave the Support Agent a way around those restrictions too.

From the original on medium.com

The system, explained from zero

RandomService.com is the name used in the write-up for a company that provides services to e-commerce store owners. An e-commerce store owner is someone who sells products through an online shop. They sign up on the website, connect their shop, and then get a set of tools: business analytics (numbers about sales and visitors), data organisation, customer support, and more.

A website like this is not one single program. It is a collection of features, and each feature has its own rules about who may use it. Those rules are called access control: the system decides, for every person and every action, whether that person is allowed to do it.

When you click around a website, your browser is constantly sending small messages to a server and receiving answers. Those messages are requests, and the addresses they go to are endpoints. An endpoint is like a service counter in a large building: you walk up to a specific counter and ask for a specific thing. The pattern that most modern websites use for these counters is called an API (Application Programming Interface). Think of the API as the building's back office: the public website is the shop front, and the API is where the actual work of fetching and storing data happens.

A request has a method, which says what kind of action you want. The most common one is GET, which means "give me something". A request also has a path, the address of the endpoint, and often a response, the answer the server sends back. Responses frequently come in a format called JSON, which is just structured text that both computers and people can read.

When you log in, the server needs a way to recognise you on every later request. It usually gives your browser a small piece of text called a session cookie or a token, which the browser sends along with each request. It works like a wristband at an event: you show it once at the entrance, and after that the staff recognise you without asking for your ID again. In this report the researcher already had a valid account, so their requests carried valid credentials automatically.

The roles and the restriction

Inside the product there is a role called Support Agent. A role is a label attached to an account that decides which features that account may use. Support staff use this role to reply to customers and resolve their issues.

Because the role is narrow, it is blocked from several features:

  • Marketing campaigns.
  • The Flows section.
  • Some of the AI Agent services the company uses internally.

One of those blocked AI features is Artifacts. An Artifact is the output an AI Agent generates after completing a task. The write-up gives two examples: an administrator creating an Artifact to collect the company's financial activity over a period, or to generate a summary of the company's latest marketing campaigns.

Notice what those examples have in common. Financial activity belongs to the analytics side of the product. Marketing summaries belong to the marketing side. So an Artifact is not self-contained data: it is a bundle of information gathered from other parts of the product. That detail is the heart of the story.

The idea behind the test

A beginner might assume that if a feature is blocked, the only thing to test is that feature. The researcher did something different: they mapped how the features relate to each other.

That mapping produced one key observation. One of the restricted functions collects information from the other restricted functions. The write-up states this abstractly as Function 3 collecting information from Function 1 and Function 2. In this product, Artifacts is the function that aggregates output produced elsewhere, which is exactly why an Artifact can contain financial activity or a summary of marketing campaigns.

A useful comparison is a company archive. Suppose you are not allowed into the finance room or the marketing room. But there is a reading room where staff compile reports that quote documents from both rooms. If the reading room's door is unlocked for you, you can read the same information without ever entering the two rooms. The restriction on the rooms is real, but it does not protect the data once it has been copied into the reading room.

So even though the Support Agent cannot reach the underlying features directly, anything that lets them read Artifacts gives them a path to information that originates in those features.

Step 1: list the Artifacts

The researcher sent a request to the endpoint that returns the collection of Artifacts:

HTTP
GET api/artifacts

Line by line:

  • GET is the method. It means "read something, do not change anything".
  • api/artifacts is the path. api is the part of the site that serves data to the interface, and artifacts names the collection of all Artifacts.

Why this step? Because to read a specific Artifact you first need to know its identifier. The collection endpoint is the natural place to look for that list. The response reveals the ID of each Artifact. An ID is a unique label the system gives to each stored item, so that it can be found again later. Think of it as a row number in a very large filing cabinet.

The write-up does not show the response body, only that it contains the identifiers.

Step 2: fetch a single Artifact by ID

With an ID in hand, the member requests the individual Artifact:

HTTP
GET api/artifacts/ID

Line by line:

  • GET again means "read".
  • api/artifacts/ID is the path to one specific Artifact. ID is a placeholder: in the real request it is replaced by one of the identifiers obtained in step 1. If the identifier were, say, a number, the path would end in that number.

Why this step? Because the collection endpoint only gives you the labels, not the contents. The per-ID endpoint is the one that returns the full contents of the selected Artifact. Those contents may include sensitive information the restricted member is not supposed to access.

The two steps together are the whole exploit: enumerate, then read. Enumerate means to obtain a list of things that exist; read means to fetch the details of one of them. The write-up does not describe any additional headers, parameters or bypass technique. No clever trick was needed: the requests simply worked.

Why this is a vulnerability

This kind of mistake is called Broken Access Control. The name is literal: the system has a rule about who may do what, and the rule is not enforced where it matters. It is one of the most common categories of web security bug, because it does not require any exotic technique. The attacker uses the product the way it was designed to be used, just with an account that should not have been allowed.

Here the rule was clear. The Artifacts function is meant to be reachable only by users who are allowed to use it, and the administrator's Artifacts are described as publicly accessible to those permitted users. A Support Agent is not among those permitted users. Yet the Support Agent could call both the collection endpoint and the per-ID endpoint and receive the data.

A useful comparison is a members-only car park. The barrier at the entrance checks your badge, but there is a second entrance around the back with no barrier at all. The rule exists, the badge exists, but one of the doors was left without a check.

What makes this bug more than a single missing check is the data flow. Because the Artifacts function aggregates output from other restricted functions, a permission failure here leaks information that the role was separately denied at the source. In other words, the company put two locks on two doors, then built a corridor between them and forgot to lock the corridor.

In everyday terms: the shop assistant at the front desk was told to turn Support Agents away, but the back office never received that instruction.

What an attacker could get

A member holding the restricted Support Agent role can retrieve every Artifact that an administrator has made accessible to permitted users. Through those Artifacts they can reach information that originates in features they cannot access directly, such as financial activity over a period or summaries of marketing campaigns.

The exposure is bounded in two ways. First, only Artifacts that have been published as Artifacts are reachable; the attacker cannot conjure data that was never aggregated. Second, the attacker needs a valid account with the restricted role. The write-up does not quantify the number of affected Artifacts or records.

How it should be fixed

The fix it points to is enforcing the role restriction on the Artifacts endpoints themselves, both the collection listing and the per-ID retrieval, so that a Support Agent receives no Artifact data regardless of what the interface exposes.

The general lesson is that hiding a button is not security. If the interface hides a feature but the endpoint behind it still answers, anyone who can send a request directly, whether by hand or with a tool, can reach the feature. The check has to live on the server, at the endpoint, on every request.

Variants worth testing

Once you understand the pattern, you can look for it elsewhere.

Glossary

  • Access control: the rules that decide which users may perform which actions on a system.
  • Aggregate: to collect information from several places and combine it into one result.
  • API (Application Programming Interface): the set of endpoints a website exposes so that software, including the browser interface, can read and change data.
  • Artifact: in this product, the output an AI Agent generates after completing a task, such as a financial summary or a marketing summary.
  • Authorisation: the decision about whether a logged-in user is allowed to do a particular thing.
  • Broken Access Control: a vulnerability where the system's access rules exist but are not enforced, so a user can do more than they should.
  • Collection endpoint: an endpoint that returns a list of items rather than a single item.
  • Cookie / token: a small piece of text the server gives the browser after login, sent back on later requests so the server can recognise the user.
  • E-commerce: selling products or services over the internet.
  • Endpoint: a specific address on a server that accepts requests for a specific action or piece of data.
  • Enumerate: to obtain a list of items that exist, typically their identifiers.
  • GET: the request method that asks the server to return something without changing it.
  • ID: a unique label the system assigns to a stored item so it can be found again.
  • JSON: a structured text format commonly used for data in API responses.
  • Method: the part of a request that says what kind of action is wanted, such as GET to read.
  • Path: the part of a request address that identifies which endpoint is being called.
  • Provenance: the origin of a piece of data, meaning which feature or module it originally came from.
  • Request: a message a browser or program sends to a server asking it to do something.
  • Response: the answer a server sends back to a request.
  • Role: a label attached to an account that determines which features it may use, such as Support Agent or administrator.
  • Role matrix: a table of roles against features used to check systematically what each role can reach.
  • Session: the period during which the server remembers who you are, usually maintained with a cookie or token.
  • Support Agent: the restricted role in this product, meant for replying to customers and resolving their issues.
  • UI (user interface): the part of the product a person sees and clicks on in the browser.

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.