Secondary context in a multi-tenant company portal

IN BRIEF

Why this matters

Two API layers disagreed about which operation a user could perform. Omar Alzughaibi documents the resulting exposure of invoices and account-management controls across companies.

  • The researchers retrieved a business document and reached an account-management screen with edit and password-change controls.
  • The reported figure of more than 3,000 companies describes the platform’s administrative scope. The number of confirmed affected companies is unknown.
In this article
A gold line crosses from one company’s file drawer to an invoice in the neighboring drawer.
Editorial illustration of a record crossing a company boundary.

One request, two different operations

A customer invoice and a password-change control turned up in the same investigation. The invoice showed that a document could cross a company boundary. The account-management screen raised a separate question: could a person who reached another company’s records also act on its accounts?

We examined the platform from the outside, without source code. Two distinct sets of error responses gave us our first clue that the public API and an internal service were making different decisions about the same request. The distinction mattered because the public API checked what it understood the caller to be asking for, while the internal service determined which operation would actually run.

We used the term secondary context for that second interpretation. A permission check is only meaningful if it covers the same user, company, resource, and action that the service ultimately handles. A valid decision about one operation gives no authority to perform a different one.

The original public API response with a 404 status and a generic resource-unavailable message.
The public API’s ordinary “not found” response served as the researchers’ point of comparison.

What the documents established

During testing, we retrieved a PDF from the platform’s document service and observed invoice records. The write-up also describes employee identity and fingerprint records. These records have different consequences for the people involved: an invoice reveals a business relationship, while a fingerprint can identify an individual long after an account password has changed.

Redacted customer invoice with its bilingual heading and line-item table visible.
The invoice retains its bilingual heading and line-item layout. Amounts and identifying details are obscured in the original.
Redacted bilingual form with visible field labels for identity number, email and address.
A second document shows the kinds of identity and address fields the researchers encountered.

The invoice is evidence of a returned business document. It cannot establish the size of the document collection or the number of people whose information someone else might have accessed. Those questions require records from the operator.

What the administrative view showed

Redacted account list with Edit and Change Password controls beside each row.
The management view shows which actions the interface offered for individual accounts.

The management screen lists accounts beside controls to edit a record or change a password. Our account of the investigation also describes access to company and branch administration. An invoice disclosure concerns confidentiality. Authority to change an account raises an additional risk: the integrity of the account and its owner’s ability to use it.

We reported that the platform managed more than 3,000 companies and their registered branches. That figure describes the scope of the administrative environment. The published evidence does not count completed changes or establish that every company’s data was accessed. The original account also gives no final remediation or retest date.

Where the permission check belongs

The service returning a document can check the caller’s company against the document owner. The service changing a password needs a different decision: whether this actor may perform that specific action on this account within this company. Either service should deny the request if the identity or company context it needs is missing. A public API can make an earlier check, but the component that reads or changes the record still has to enforce the decision.

A regression test can make the distinction concrete. Create two fictional companies and an administrator for only one. Confirm that the administrator can manage the intended company, while an invoice read and an account change involving the other company are both denied. For the denied change, check the stored account as well as the response. Audit records should identify the actor, company, action, and outcome without copying invoice contents or identity documents into logs.

FROM RESEARCH TO YOUR SCOPE

What should we
investigate next?

Talk to our team about the systems, workflows, and boundaries that matter to your business.