← Primitive Engineering: security advisories
ZSA-2026-002

Repository-scoped role satisfies instance-level authorization (?repo= scope confusion)

P0published 2026-09-02updated 2026-09-26
This page shows advisory ZSA-2026-002, generated from its source. The same advisory is available as a CSAF 2.0 document.

§1Severity

P0 on the manufacturer's scale (privilege escalation between authorization scopes); no CVSS vector assigned

§2Summary

The authorization middleware resolved the caller's role in the scope the request names, and took that scope from the ?repo= query parameter on every route, including routes that are instance-level by nature (user administration, enrollment tokens, forward tokens, organization credentials). An authenticated identity that holds a repository- or organization-level role (a repository owner, or an organization admin whose role a repository inherits) could therefore append ?repo=<a repository it owns> to an instance-level request and be authorized with its repository role. The review found no path for an anonymous caller, and none for an identity holding no repository or organization role. It was found by reading the middleware; exploitation was not reproduced against a live deployment and is not known to have occurred.

§3Affected products

ProductStatusVersions
Primitive Engineering ZeGit Control Plane (z-backend)unaffectedbefore 0.0.134
affected0.0.134 to before 0.0.141
unaffected0.0.141 and later

§4Action required

Upgrade the Control Plane to v0.0.141 or later; v0.1.1 or later also closes the residual. Then repeat the audit-chain review described under mitigation for the affected window.

§5Mitigation

There is no configuration switch: the scope was read from the query string on every route. Until upgraded, grant repository and organization roles only to identities trusted with instance administration, and review the audit chain for owner-tier mutations (enroll.token_issued, user.role_changed, forward_token.issued, org_credential.set) whose actor holds no instance admin role. The hash chain records the acting identity on every such event.

§6Reported by

Internal, the security review of 2026-09-02

§7CRA Article 14 notification

Not applicable; not actively exploited.

§8Timeline

  1. 2026-09-02initial-advisory

    Published. Found by the manufacturer's security review of 2026-09-02.

  2. 2026-09-03fix-available

    Fixed in v0.0.141, where instance-level routes evaluate the global role.

  3. 2026-09-26update

    The residual, the global-role fallback in repository scope, is closed in v0.1.1 (migration 0047).