Summary
InvoiceShelf public customer routes can use an EmailLog token without confirming that its document type and numeric identifier refer to the same resource. This may allow cross-company invoice, estimate, or payment disclosure, and expired tokens may remain usable on JSON endpoints.
InvoiceShelf public customer routes can use an EmailLog token without confirming that its document type and numeric identifier refer to the same resource. This may allow cross-company invoice, estimate, or payment disclosure, and expired tokens may remain usable on JSON endpoints.
Affected context
The issue affects InvoiceShelf deployments using public customer invoice, estimate, and payment routes before the relevant authorization checks are applied. Risk is present when numeric identifiers collide across document types or companies, when token expiration is not enforced consistently, and when view handlers can act on a mismatched resource.
The issue affects InvoiceShelf deployments using public customer invoice, estimate, and payment routes before the relevant authorization checks are applied. Risk is present when numeric identifiers collide across document types or companies, when token expiration is not enforced consistently, and when view handlers can act on a mismatched resource.
Exploit preconditions
- Attack surface: Public customer-facing HTTP routes for invoices, estimates, and payments
- Required access: Possession of an EmailLog token; ordinary authentication may not be required
- Trigger point: Token-based resource lookup and subsequent JSON or view-handler processing
- Why exploitation is possible: Authorization relies on a numeric mailable identifier without consistently validating mailable type, ownership, and token expiration
- Attack surface: Public customer-facing HTTP routes for invoices, estimates, and payments
- Required access: Possession of an EmailLog token; ordinary authentication may not be required
- Trigger point: Token-based resource lookup and subsequent JSON or view-handler processing
- Why exploitation is possible: Authorization relies on a numeric mailable identifier without consistently validating mailable type, ownership, and token expiration
Why this happens
The underlying flaw is an authorization and object-binding failure mapped to CWE-285. The application uses a token's numeric mailable identifier without enforcing the associated mailable type and does not consistently apply the token's expiration status across handlers. This permits an identifier to be interpreted in an unintended tenant or document context and allows business actions to proceed without complete authorization checks.
The underlying flaw is an authorization and object-binding failure mapped to CWE-285. The application uses a token's numeric mailable identifier without enforcing the associated mailable type and does not consistently apply the token's expiration status across handlers. This permits an identifier to be interpreted in an unintended tenant or document context and allows business actions to proceed without complete authorization checks.
Potential impact
- An attacker may disclose another company's invoice, estimate, or payment information.
- An expired token may remain usable on affected JSON routes.
- A request could mark a mismatched invoice or estimate as viewed.
- The application may send an unauthorized notification.
- Sensitive customer or financial information could be exposed across tenant boundaries.
- An attacker may disclose another company's invoice, estimate, or payment information.
- An expired token may remain usable on affected JSON routes.
- A request could mark a mismatched invoice or estimate as viewed.
- The application may send an unauthorized notification.
- Sensitive customer or financial information could be exposed across tenant boundaries.
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every token-based
resource boundary rather than relying on identifier uniqueness.
Common defensive patterns include:
- Bind tokens to an explicit document type, tenant, and resource identity.
- Enforce token expiration consistently in JSON and view handlers.
- Perform ownership and authorization checks before retrieving or mutating data.
- Prefer opaque, scoped references over reusable numeric identifiers where practical.
- Apply deny-by-default authorization and least-privilege access to customer resources.
- Avoid state changes or notifications unless the resolved resource passes all authorization checks.
Mitigation generally focuses on enforcing authorization at every token-based
resource boundary rather than relying on identifier uniqueness.
Common defensive patterns include:
- Bind tokens to an explicit document type, tenant, and resource identity.
- Enforce token expiration consistently in JSON and view handlers.
- Perform ownership and authorization checks before retrieving or mutating data.
- Prefer opaque, scoped references over reusable numeric identifiers where practical.
- Apply deny-by-default authorization and least-privilege access to customer resources.
- Avoid state changes or notifications unless the resolved resource passes all authorization checks.
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static analysis and code review for lookups based only on numeric identifiers from tokens.
- Review of routes and controllers for missing type, tenant, ownership, or expiration checks.
- Tests that use colliding identifiers across document types and separate companies.
- Negative authorization tests for expired, mismatched, and cross-tenant tokens.
- Runtime monitoring for token reuse after expiration and access to resources outside the token's tenant.
- Policy checks requiring centralized authorization middleware for public resource endpoints.
Organizations can identify similar weaknesses through:
- Static analysis and code review for lookups based only on numeric identifiers from tokens.
- Review of routes and controllers for missing type, tenant, ownership, or expiration checks.
- Tests that use colliding identifiers across document types and separate companies.
- Negative authorization tests for expired, mismatched, and cross-tenant tokens.
- Runtime monitoring for token reuse after expiration and access to resources outside the token's tenant.
- Policy checks requiring centralized authorization middleware for public resource endpoints.

