{
  "document": {
    "aggregate_severity": {
      "text": "P0 on the manufacturer's scale (privilege escalation between authorization scopes); no CVSS vector assigned"
    },
    "category": "csaf_security_advisory",
    "csaf_version": "2.0",
    "distribution": {
      "tlp": {
        "label": "WHITE"
      }
    },
    "lang": "en",
    "notes": [
      {
        "category": "summary",
        "text": "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=\u003ca repository it owns\u003e 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.",
        "title": "Summary"
      },
      {
        "category": "other",
        "text": "Internal, the security review of 2026-09-02",
        "title": "Reported by"
      },
      {
        "category": "other",
        "text": "Not applicable; not actively exploited.",
        "title": "CRA Article 14 notification"
      }
    ],
    "publisher": {
      "category": "vendor",
      "name": "Primitive Engineering",
      "namespace": "https://primitive-engineering.se"
    },
    "title": "Repository-scoped role satisfies instance-level authorization (?repo= scope confusion)",
    "tracking": {
      "current_release_date": "2026-09-26T00:00:00Z",
      "generator": {
        "engine": {
          "name": "Watchsong",
          "version": "0.0.49"
        }
      },
      "id": "ZSA-2026-002",
      "initial_release_date": "2026-09-02T00:00:00Z",
      "revision_history": [
        {
          "date": "2026-09-02T00:00:00Z",
          "number": "1",
          "summary": "initial-advisory: Published. Found by the manufacturer's security review of 2026-09-02."
        },
        {
          "date": "2026-09-03T00:00:00Z",
          "number": "2",
          "summary": "fix-available: Fixed in v0.0.141, where instance-level routes evaluate the global role."
        },
        {
          "date": "2026-09-26T00:00:00Z",
          "number": "3",
          "summary": "update: The residual, the global-role fallback in repository scope, is closed in v0.1.1 (migration 0047)."
        }
      ],
      "status": "final",
      "version": "3"
    }
  },
  "product_tree": {
    "branches": [
      {
        "branches": [
          {
            "branches": [
              {
                "category": "product_version_range",
                "name": "vers:semver/\u003c0.0.134",
                "product": {
                  "name": "Primitive Engineering ZeGit Control Plane (z-backend) vers:semver/\u003c0.0.134",
                  "product_id": "CSAFPID-0001"
                }
              },
              {
                "category": "product_version_range",
                "name": "vers:semver/\u003e=0.0.134|\u003c0.0.141",
                "product": {
                  "name": "Primitive Engineering ZeGit Control Plane (z-backend) vers:semver/\u003e=0.0.134|\u003c0.0.141",
                  "product_id": "CSAFPID-0002"
                }
              },
              {
                "category": "product_version_range",
                "name": "vers:semver/\u003e=0.0.141",
                "product": {
                  "name": "Primitive Engineering ZeGit Control Plane (z-backend) vers:semver/\u003e=0.0.141",
                  "product_id": "CSAFPID-0003"
                }
              }
            ],
            "category": "product_name",
            "name": "ZeGit Control Plane (z-backend)"
          }
        ],
        "category": "vendor",
        "name": "Primitive Engineering"
      }
    ]
  },
  "vulnerabilities": [
    {
      "cwe": {
        "id": "CWE-863",
        "name": "Incorrect Authorization"
      },
      "ids": [
        {
          "system_name": "ZeGit security review",
          "text": "ZR-2026-09-01"
        }
      ],
      "notes": [
        {
          "category": "description",
          "text": "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=\u003ca repository it owns\u003e 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.",
          "title": "Description"
        }
      ],
      "product_status": {
        "fixed": [
          "CSAFPID-0003"
        ],
        "known_affected": [
          "CSAFPID-0002"
        ],
        "known_not_affected": [
          "CSAFPID-0001"
        ]
      },
      "release_date": "2026-09-02T00:00:00Z",
      "remediations": [
        {
          "category": "vendor_fix",
          "details": "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.",
          "product_ids": [
            "CSAFPID-0002"
          ]
        },
        {
          "category": "mitigation",
          "details": "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.",
          "product_ids": [
            "CSAFPID-0002"
          ]
        }
      ],
      "title": "?repo= scope confusion on instance-level routes"
    }
  ]
}
