Deprecated owners.query API bypasses object view policy
The deprecated owners.query API did not enforce the object view policy, so a user could retrieve details about owner packages they were not permitted to see. This exposed names, descriptions, owner and repository identifiers, and a path that might belong to a restricted repository.
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 3 days
The deprecated owners.query API does not check object view policy. A user is able to view some information about an owner package which they do not have permission to see by calling this API. Since the API is deprecated, it could just be removed.
Impact
An attacker is able to view some information about an owner package that they should not be able to see. Including, name, description, owner PHIDs, and repository PHIDs, and a path (which may be a path that belongs to a restricted repository).
What the report shows
The target is Phabricator's deprecated owners.query API, an endpoint that returns information about owner packages. The researcher, dyls, found that this API does not check the object view policy before returning data. A user who is not permitted to see a given owner package can still call the API and read some of its details.
The report does not include a request, a response, a version number or a reproduction transcript. What it states is the mechanism: the deprecated endpoint skips the view policy check that the rest of the application applies. The researcher's suggested fix is blunt, since the API is deprecated it could simply be removed.
The report was disclosed on 31 May 2022 under the Improper Access Control category, with a bounty of 300.00 USD. No severity or CVSS score is given.
Root cause
The cause is that owners.query does not check the object view policy before returning data. The result is an object-level authorisation gap: the API returns fields from an owner package without first asking whether the caller may view that package.
Impact
An attacker can view information about an owner package they should not be able to see. The report lists the exposed fields: name, description, owner PHIDs, repository PHIDs, and a path, which may belong to a restricted repository. The disclosure is partial rather than total: the report says "some information", not the full object. The value of the leak is in the metadata. The report lists the exposed fields, including a path that may belong to a restricted repository.
How this kind of bug works
Web applications enforce two kinds of authorisation. Function-level checks decide whether a user may call an operation at all. Object-level checks decide whether that user may act on this particular record. A bypass happens when an endpoint performs the first and skips the second, or skips both.
Legacy and deprecated endpoints are a common home for this. They are often excluded from newer middleware, they may predate a central policy service, and they are rarely covered by current tests. The same pattern appears in internal or debug APIs, in bulk export endpoints, and in older API versions kept alive for compatibility. The object identifier in the request (a PHID, an ID, a slug) is attacker-controlled, so the attacker simply supplies identifiers of objects they cannot see through the normal interface and reads whatever comes back.
Defences are centralised authorisation: every read path, including deprecated ones, should pass through the same policy check before serialising a response. Removing dead endpoints is the strongest control of all.
How to test for it
- Map the API surface. Look for deprecated, legacy, internal or versioned endpoints, and for documentation that marks an endpoint as old. Compare the documented endpoints against what the current UI actually calls.
- Create two accounts with different privileges, or use one low-privileged account and one object it cannot see. Record the object identifiers (IDs, PHIDs, slugs) of the restricted object from the privileged account.
- Call the suspect endpoint with the low-privileged account, supplying the restricted identifier. Try the same call with no credentials and with a credential that has no access to the object.
- Compare the response with what the normal, policy-enforcing endpoint returns for the same object. A positive result is a successful response containing fields from the restricted object: names, descriptions, owner or repository identifiers, paths, or any metadata the UI hides.
- Check partial leaks too. An endpoint that returns only a name or a path still confirms existence and can be enough for a report.
Common false positives: the object may be world-readable by design, so confirm the policy in the UI first; the response may be a generic error that merely echoes the identifier; and cached or public metadata may legitimately be exposed. Also check that the identifier you used is not one the low-privileged account can already see through another route.
How it is fixed
- Remove the deprecated endpoint if nothing depends on it, as the report suggests.
- Otherwise, route the endpoint through the same policy check used by the current API before any object data is serialised.
- Apply the check per object, not per endpoint, so that a caller cannot mix visible and invisible identifiers in one request.
- Add regression tests that call legacy endpoints with an unauthorised principal and assert a denial.
Hunting notes
This bug class hides in the parts of an application that nobody maintains: deprecated APIs, old API versions, mobile or partner endpoints, export and reporting features, and anything documented as legacy. Recon signals include API documentation that flags endpoints as deprecated, changelogs that mention removed features, and JavaScript bundles that still reference old routes. Comparing the fields returned by an old endpoint with those returned by its replacement is a quick way to spot a policy gap.
What happened, in plain words
Phabricator is a web application that teams use to manage software projects. One of its features is "owner packages": groups that say who is responsible for a particular part of a codebase or a set of repositories. The report says the API exposes a name, a description, owner PHIDs, repository PHIDs and a path. An owner package has a view policy: a rule that says which users are allowed to see it.
Applications like this usually offer two ways to get data: the pages you click in a browser, and an API. An API (Application Programming Interface) is a set of URLs meant for programs rather than people: you send a request to a URL, and the server sends back structured data, often in JSON. Phabricator has an API endpoint called owners.query, which returns information about owner packages. The word "deprecated" means the vendor has marked it as old and discourages its use, usually because a newer replacement exists.
The researcher, dyls, found that this deprecated owners.query endpoint does not check the object view policy before returning data. In other words, the API answers questions about an owner package without first asking whether the caller is allowed to see that package. A user who cannot see a package in the browser can still call the API and read some of its details.
The report does not include a request, a response, a version number or a step-by-step reproduction. What it states is the mechanism: the deprecated endpoint skips the view policy check that the rest of the application applies. The suggested fix is blunt: since the API is deprecated, it could simply be removed.
The report was disclosed on 31 May 2022 under the Improper Access Control category, with a bounty of 300.00 USD. No severity rating or CVSS score is given.
Why it matters
An attacker can view information about an owner package they should not be able to see. The report lists the exposed fields: name, description, owner PHIDs, repository PHIDs, and a path, which may belong to a restricted repository.
A PHID is Phabricator's internal identifier for an object. Seeing a PHID does not give you the object itself, but it tells you the object exists and gives you a handle you can use elsewhere. The leak is partial rather than total: the report says "some information", not the full object.
The value is in the metadata. The report lists the exposed fields, including a path that may belong to a restricted repository.
In general, how this kind of bug works
Web applications enforce two kinds of authorisation. Function-level checks decide whether a user may call an operation at all. Object-level checks decide whether that user may act on this particular record. A bypass happens when an endpoint performs the first and skips the second, or skips both.
A useful comparison is a hotel. Function-level authorisation is the reception desk asking whether you are a guest at all. Object-level authorisation is the door lock checking whether this particular room key opens this particular room. A building that checks you at the entrance but never locks the doors lets any guest walk into any room.
Legacy and deprecated endpoints are a common home for this. They are often excluded from newer middleware (shared code that runs on every request), they may predate a central policy service, and they are rarely covered by current tests. The same pattern appears in internal or debug APIs, in bulk export endpoints, and in older API versions kept alive for compatibility. The object identifier in the request (a PHID, an ID, a slug) is attacker-controlled, so the attacker simply supplies identifiers of objects they cannot see through the normal interface and reads whatever comes back.
Defences are centralised authorisation: every read path, including deprecated ones, should pass through the same policy check before the response is built. Removing dead endpoints is the strongest control of all.
In general, how to test for it
- Map the API surface. Look for deprecated, legacy, internal or versioned endpoints, and for documentation that marks an endpoint as old. Compare the documented endpoints against what the current UI actually calls.
- Create two accounts with different privileges, or use one low-privileged account and one object it cannot see. Record the object identifiers (IDs, PHIDs, slugs) of the restricted object from the privileged account.
- Call the suspect endpoint with the low-privileged account, supplying the restricted identifier. Try the same call with no credentials and with a credential that has no access to the object.
- Compare the response with what the normal, policy-enforcing endpoint returns for the same object. A positive result is a successful response containing fields from the restricted object: names, descriptions, owner or repository identifiers, paths, or any metadata the UI hides.
- Check partial leaks too. An endpoint that returns only a name or a path still confirms existence and can be enough for a report.
Common false positives: the object may be world-readable by design, so confirm the policy in the UI first; the response may be a generic error that merely echoes the identifier; and cached or public metadata may legitimately be exposed. Also check that the identifier you used is not one the low-privileged account can already see through another route.
In general, how it is fixed
- Remove the deprecated endpoint if nothing depends on it, as the report suggests.
- Otherwise, route the endpoint through the same policy check used by the current API before any object data is returned.
- Apply the check per object, not per endpoint, so that a caller cannot mix visible and invisible identifiers in one request.
- Add regression tests that call legacy endpoints with an unauthorised user and assert a denial.
In general, where to hunt
This bug class hides in the parts of an application that nobody maintains: deprecated APIs, old API versions, mobile or partner endpoints, export and reporting features, and anything documented as legacy. Recon signals include API documentation that flags endpoints as deprecated, changelogs that mention removed features, and JavaScript bundles that still reference old routes. Comparing the fields returned by an old endpoint with those returned by its replacement is a quick way to spot a policy gap.
Glossary
- API: a set of URLs meant for programs rather than people, used to send requests and receive structured data.
- Endpoint: one specific URL in an API that performs one operation.
- Deprecated: marked as old and discouraged, usually because a newer replacement exists.
- Owner package: a Phabricator record naming who is responsible for a part of a codebase or a set of repositories.
- View policy: a rule that says which users are allowed to see a record.
- Authorisation: the process of deciding whether a user is allowed to perform an action.
- Function-level check: an authorisation check on whether a user may call an operation at all.
- Object-level check: an authorisation check on whether a user may act on one particular record.
- Access control: the general mechanism that enforces who can see or do what.
- Improper access control: a vulnerability class where those rules are missing or can be bypassed.
- PHID: Phabricator's internal unique identifier for an object, a long string rather than a simple number.
- Repository: a storage location for source code, often with restricted visibility.
- Metadata: descriptive information about an object (name, identifiers, paths) rather than its contents.
- Reconnaissance: gathering information about a target to prepare a later attack.
- Middleware: shared code that runs on every request before the main handler.
- JSON: a text format for structured data, commonly used in API responses.
- CVSS: a standard scoring system for the severity of a vulnerability.
- Bounty: a payment made to a researcher for a valid security report.
- False positive: a finding that looks like a vulnerability but is not one.