Bigcapital: Cross-Tenant Invoice Disclosure via Payment Links

An authenticated user of any organization reads the invoice, customer data and PDF of another organization through the UUID of a payment link.

Advisory ID: TP-2026-157
Product: Bigcapital (open-source accounting software for multiple organizations)
Vulnerability type: Cross-tenant disclosure through missing authorization (CWE-639)
CVE: not requested
CVSS 3.1: 6.3 (Medium) · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
Affected versions: verified live on 0.25.23; versions before 0.25.42 do not contain the fix
Fixed in: 0.25.42
Reported: 19 July 2026

Summary

Bigcapital is open-source accounting software in which every organization keeps its data in a tenant of its own. Payment links can be generated for invoices, and their UUID makes the invoice retrievable through /api/payment-links/:paymentLinkId/invoice and /invoice/pdf. Both routes check the caller against the caller's own organization and then switch the request to the tenant that owns the link, without checking the link's visibility or its ownership. An authenticated user of any organization who knows the UUID of a payment link reads the invoice, the customer data and the rendered PDF of another organization, even when the link is stored as private.

Root cause

Line numbers refer to 0.25.23: PaymentLinksController (packages/server/src/modules/PaymentLinks/PaymentLinks.controller.ts) carries no @PublicRoute(), so the global guards check the caller's token and organization-id header against the caller's own organization.
GetInvoicePaymentLinkMetadata then loads the link by linkId alone and sets the link's tenant as the tenant of the request with clsService.set('organizationId', tenant.organizationId) (packages/server/src/modules/PaymentLinks/GetInvoicePaymentLinkMetadata.ts:32-52).
GetPaymentLinkInvoicePdf switches the tenant in the same way and renders the invoice PDF (packages/server/src/modules/PaymentLinks/GetPaymentLinkInvoicePdf.ts:28-41).
Neither service checks the publicity column or compares the link's tenant with the caller's.
publicity defaults to private (packages/server/src/modules/SaleInvoices/GenerateInvoicePaymentLink.service.ts:37-49), and POST /sale-invoices/:id/generate-link passes no other value (packages/server/src/modules/SaleInvoices/SaleInvoices.controller.ts:401), so every link created that way counts as private and resolves anyway.

Proof of Concept

# Organization A generates a payment link
POST /api/sale-invoices/2/generate-link

{"publicity":"private","link":".../payment/64a3b45a-43af-4a23-8284-b0ec6e1755b3","tenant_id":1}

# Organization B: own bearer token, own organization-id header
GET /api/payment-links/64a3b45a-43af-4a23-8284-b0ec6e1755b3/invoice

HTTP 200
... "customer_name":"ACME Secret Corp (ORG-A CONFIDENTIAL)" ... "invoice_no":"INV-00002" ...

GET /api/payment-links/64a3b45a-43af-4a23-8284-b0ec6e1755b3/invoice/pdf

HTTP 200
%PDF- (60985 bytes)

Organization B is a freshly registered account with no customers of its own and receives the invoice, customer data and PDF of organization A, although the link is stored as private in the database. Without a token both routes answer with HTTP 401. The UUID is a UUIDv4 and no route lists it to other organizations, so the attacker has to obtain it by other means.

Impact

  • Read access to other organizations' invoices across tenant boundaries: invoice number, line items, amounts, due date and details of the issuing organization.
  • Disclosure of the customer data on the invoice, including name, address and phone number, and of the fully rendered PDF.
  • Links stored as private are retrievable just like shared ones.
  • Limited: read access only, and the attacker needs the UUID of the payment link and an account in any organization.

References

Is Something Like This in Your Software?

Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.