Analysis and loopback-restricted PoC for CVE-2026-122158, a cross-tenant privilege escalation in InvoiceShelf allowing an owner to assign arbitrary roles in another tenant.

A company owner can place an attacker-controlled account into another tenant with an arbitrary role, including
owner.
Português do Brasil · Official advisory · Fix for 2.x · Fix for 3.x
VulDB accepted submission #1028117, created VDB-431158, and assigned CVE-2026-122158. The canonical CVE record was published on November 5, 2026.
| Item | Value |
|---|---|
| Product | InvoiceShelf |
| Affected | <= 2.4.3; 3.0.0-alpha.1 through 3.0.0-alpha.3 |
| Fixed | 2.4.4; 3.0.0-alpha.4 |
| GHSA severity | Critical |
| Weakness | CWE-284, CWE-863 (GHSA); CWE-284, CWE-266 (CVE) |
| VulDB CVSS v3.1 | 4.7 — CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C |
| Researcher CVSS v3.1 | 9.1 — CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H |
| Advisory | GHSA-c9cx-7r7m-264v |
| CVE | CVE-2026-122158 |
| VulDB | VDB-431158 |
MemberRequest validates only the shape of the client-controlled companies array. It does not establish that the caller owns the referenced company or may assign the requested role:
'companies' => ['required'],
'companies.*.id' => ['required'],
'companies.*.role' => ['required'],
MemberService::create() and update() then treat that list as authoritative. They synchronize memberships using the supplied IDs and switch Bouncer's authorization scope to each supplied company before assigning the supplied role:
$member->companies()->sync($memberships->pluck('id'));
foreach ($memberships as $membership) {
BouncerFacade::scope()->to($membership['id']);
BouncerFacade::sync($member)->roles([$membership['role']]);
}
The controller verifies that the caller owns the active company. It does not bind that authorization decision to companies[].id in the request body. This creates a confused authorization boundary:
owner of Company A
│ authorized to create a member in A
▼
POST /api/v1/members
companies[0].id = Company B
companies[0].role = owner
│ values trusted by the service
▼
attacker-controlled account becomes an owner of Company B
The repository deliberately provides a laboratory-only reproducer. It refuses non-loopback targets and does nothing unless --execute is supplied. We did not execute it while preparing this disclosure.
Prerequisites:
2.4.3 or 3.0.0-alpha.3 test installation.Preview the request without sending it:
python3 poc/poc.py \
--base-url http://127.0.0.1:8080 \
--token LAB_TOKEN \
--active-company-id 1 \
--victim-company-id 2 \
--email [email protected]
After reviewing the generated request, an authorized tester can add --execute. On a vulnerable release, the expected vulnerable result is HTTP 200/201 and a new member associated with Company B as owner. A fixed release must reject the cross-company membership, normally with HTTP 403 or 422, and must not create the unauthorized relationship.
See poc/poc.py and poc/request.http.
An owner of one legitimate tenant can obtain administrative control over another tenant on the same installation. The resulting account can access or alter invoices, customers, payments and other financial records, invite additional users, and exercise any capability granted to the selected role. Confidentiality, integrity and availability cross the intended tenant boundary.
VulDB scores the issue as Medium (4.7) with unchanged scope and Low impact to confidentiality, integrity, and availability. The public GHSA rates it Critical, while the researcher vector models the administrative cross-tenant boundary as changed scope with High impact. These are different risk models for the same root cause; consumers should apply the vector that matches their deployment and vulnerability-management policy.
Upgrade to 2.4.4, 3.0.0-alpha.4, or a later release. The fix restricts submitted company IDs to companies owned by the caller, validates roles in their company scope, preserves memberships outside the caller's authority, and prevents sensitive account changes when a member also belongs to a company the caller does not own.
0076ab9c5b1840d53690e721a1a4e7a91a068795| Date | Event |
|---|---|
| 2026-09-16 | InvoiceShelf commit 0076ab9c5b1840d53690e721a1a4e7a91a068795 audited |
| 2026-09-23 | Vendor published GHSA-c9cx-7r7m-264v and credited capivara-research as reporter |
| 2026-11-04 | VulDB accepted submission #1028117, created VDB-431158, and reserved CVE-2026-122158 |
| 2026-11-05 | The canonical CVE record was published |
Research and disclosure credits:
The public GHSA currently lists capivara-research as Reporter and gdarko as Coordinator.
Use this material only on systems you own or have explicit permission to test. The reproducer is constrained to loopback laboratory targets. Do not test public or third-party InvoiceShelf installations.