Skip to content
Heist/ feed
Back to feed
Medium

zrok's broken ownership check in DELETE /api/v2/unaccess allows non-admin to delete global frontend records

Type: advisorySources: OSV

zrok is software for sharing web services, files, and network resources. Prior to version 2.0.1, the unaccess handler (controller/unaccess.go) contains a logical error in its ownership guard: when a frontend record has environment_id = NULL (the marker for admin-created global frontends), the condition short-circuits to false and allows the deletion to proceed without any ownership verification. A non-admin user who knows a global frontend token can call DELETE /api/v2/unaccess with any of their own environment IDs and permanently delete the global frontend, taking down all public shares routed through it. Version 2.0.1 patches the issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40304
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 09:45 UTC · Revision 1

Source evidence

zrok's broken ownership check in DELETE /api/v2/unaccess allows non-admin to delete global frontend records

core-osv · Original source

Published 17 Apr 2026, 21:04 UTC

zrok is software for sharing web services, files, and network resources. Prior to version 2.0.1, the unaccess handler (controller/unaccess.go) contains a logical error in its ownership guard: when a frontend record has environment_id = NULL (the marker for admin-created global frontends), the condition short-circuits to false and allows the deletion to proceed without any ownership verification. A non-admin user who knows a global frontend token can call DELETE /api/v2/unaccess with any of their own environment IDs and permanently delete the global frontend, taking down all public shares routed through it. Version 2.0.1 patches the issue.

osv:CVE-2026-40304
Complete source record
{
  "id": "4e028edb0844697d3af3b0cd9fcabc538ae888f46cf86b35243359f8edf1a332",
  "url": "https://osv.dev/vulnerability/CVE-2026-40304",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "zrok's broken ownership check in DELETE /api/v2/unaccess allows non-admin to delete global frontend records",
    "summary": "zrok is software for sharing web services, files, and network resources. Prior to version 2.0.1, the unaccess handler (controller/unaccess.go) contains a logical error in its ownership guard: when a frontend record has environment_id = NULL (the marker for admin-created global frontends), the condition short-circuits to false and allows the deletion to proceed without any ownership verification. A non-admin user who knows a global frontend token can call DELETE /api/v2/unaccess with any of their own environment IDs and permanently delete the global frontend, taking down all public shares routed through it. Version 2.0.1 patches the issue.",
    "evidence": "osv:CVE-2026-40304",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-40304",
      "aliases": [
        "CVE-2026-40304",
        "GHSA-3jpj-v3xr-5h6g",
        "GO-2026-5090"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/openziti/zrok",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "69b9b8dd6d96be15639338414574aa5003f5f8f2"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "69b9b8dd6d96be15639338414574aa5003f5f8f2"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.0.1"
                  },
                  {
                    "cpe": "cpe:2.3:a:netfoundry:zrok:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.1.11",
            "v2.0.0",
            "v2.0.0-rc9",
            "v2.0.0-rc8",
            "v2.0.0-rc7",
            "v2.0.0-rc6",
            "v2.0.0-rc5",
            "v1.1.10",
            "v1.1.8",
            "v1.1.7",
            "v1.1.6",
            "v1.1.5",
            "v1.1.4",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.8",
            "v1.0.7",
            "v1.0.6",
            "v1.0.5",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.4.49",
            "v0.4.48",
            "v0.4.47",
            "v0.4.46",
            "v0.4.45",
            "v0.4.44",
            "v0.4.43",
            "v0.4.42",
            "v0.4.41",
            "v0.4.40",
            "v0.4.39",
            "v0.4.38",
            "v0.4.37",
            "v0.4.36",
            "v0.4.35",
            "v0.4.34",
            "v0.4.33",
            "v0.4.32",
            "v0.4.31",
            "v0.4.30",
            "v0.4.29",
            "v0.4.28",
            "v0.4.26",
            "v0.4.27",
            "v0.4.24",
            "v0.4.25",
            "v0.4.23",
            "v0.4.22",
            "v0.4.21",
            "v0.4.20",
            "v0.4.19",
            "v0.4.18",
            "v0.4.17",
            "v0.4.16",
            "v0.4.15",
            "v0.4.14",
            "v0.4.13",
            "v0.4.12",
            "v0.4.11",
            "v0.4.10",
            "v0.4.9",
            "v0.4.8",
            "v0.4.7",
            "v0.4.6",
            "v0.4.5",
            "v0.4.4",
            "v0.4.3",
            "v0.4.2",
            "v0.4.0",
            "v0.3.6",
            "v0.3.5",
            "v0.3.5-rc1",
            "v0.3.4",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.3.0-rc6",
            "v0.3.0-rc5",
            "v0.3.0-rc4",
            "v0.3.0-rc3",
            "v0.3.0-rc2",
            "v0.3.0-rc1",
            "v0.2.18",
            "v0.2.17",
            "v0.2.16",
            "v0.2.15",
            "v0.2.14",
            "v0.2.13",
            "v0.2.12",
            "v0.2.11",
            "v0.2.10",
            "v0.2.9",
            "v0.2.8",
            "v0.2.7",
            "v0.2.6",
            "v0.2.5",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0.4",
            "v0.2.0.3",
            "v0.2.0.2",
            "v0.2.0.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40304.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.621098555Z",
      "provider": "osv",
      "references": [
        "https://github.com/openziti/zrok/releases/tag/v2.0.1",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40304.json",
        "https://github.com/openziti/zrok/security/advisories/GHSA-3jpj-v3xr-5h6g",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40304"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-284",
          "CWE-863"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40304.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40304",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494306,
  "published_at": "2026-04-17T21:04:23.648+00:00"
}