{"id":"CVE-2026-44423","aliases":["CVE-2026-44423","GHSA-9w9c-9w8m-w89q","GO-2026-5302"],"related":[],"kind":"vulnerability","state":"published","title":"ShellHub: Cross-tenant IDOR in `GET /api/sessions/:uid` discloses SSH session data","summary":"ShellHub is a centralized SSH gateway. Prior to 0.24.2, GET /api/sessions/:uid returns the full session object for any authenticated caller, without scoping by the caller's tenant. An authenticated user can read session records (SSH username, device UID, remote IP, terminal type, authenticated flag, timestamps) belonging to any other namespace. This vulnerability is fixed in 0.24.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"ShellHub is a centralized SSH gateway. Prior to 0.24.2, GET /api/sessions/:uid returns the full session object for any authenticated caller, without scoping by the caller's tenant. An authenticated user can read session records (SSH username, device UID, remote IP, terminal type, authenticated flag, timestamps) belonging to any other namespace. This vulnerability is fixed in 0.24.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n`GET /api/sessions/:uid` returns the full session object for any authenticated caller, without scoping by the caller's tenant. An authenticated user can read session records (SSH username, device UID, remote IP, terminal type, authenticated flag, timestamps) belonging to any other namespace.\n\n## Severity\n**CVSS 3.1: 7.5 (High)** \nCWE-639\n\n## Affected versions\nShellHub Community v0.24.1 (by code inspection — same vulnerable pattern as `GetDevice`). Not plant-reproducible without an active SSH session, but the flaw is structurally identical and confirmed via static analysis.\n\n## Root cause\n`api/services/session.go:37-44` — `GetSession` resolves the session by UID without any tenant filter:\n\n  ```go\n  func (s *service) GetSession(ctx context.Context, uid models.UID) (*models.Session, error) {\n      session, err := s.store.SessionResolve(ctx, store.SessionUIDResolver, string(uid))\n      // ⚠️ missing: s.store.Options().InNamespace(tenant)\n      ...\n  }\n  ```\n\nThe `Authorize` middleware only verifies presence of a tenant in the context, not ownership of the requested session.\n\n## Proof of concept\n\nPre-requisite: attacker has any valid user account and has obtained a session UID from the victim tenant (UIDs may leak via logs, shared session recordings, UI URLs, or through the device IDOR in the companion advisory since sessions reference devices by UID).\n\n  ```bash\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  # Attempt cross-tenant read\n  curl -i \"http://target/api/sessions/<victim-session-uid>\" \\\n    -H \"Authorization: Bearer $ATTACKER_TOKEN\"\n  # Expected (fixed):   HTTP 403/404\n  # Observed (v0.24.1): HTTP 200 + full session JSON\n  ```\n\n## Impact\n  - Cross-tenant disclosure of SSH session data: target username, device UID, remote IP, authenticated status, session type, terminal, position (geolocation), started_at / last_seen timestamps.\n  - Enables reconnaissance of other tenants' active users and systems; combined with session recording features, can enable deeper recon.\n\n## Suggested fix\n`api/services/session.go` — apply `InNamespace` in `GetSession`:\n\n  ```go\n  func (s *service) GetSession(ctx context.Context, uid models.UID) (*models.Session, error) {\n      tenant := gateway.TenantFromContext(ctx)\n      opts := []store.QueryOption{}\n      if tenant != nil {\n          opts = append(opts, s.store.Options().InNamespace(tenant.ID))\n      }\n      session, err := s.store.SessionResolve(ctx, store.SessionUIDResolver, string(uid), opts...)\n      ...\n  }\n  ```","format":"markdown","source":"ghsa"},{"lang":"en","text":"ShellHub has cross-tenant IDOR in `GET /api/sessions/:uid` that discloses SSH session data in github.com/shellhub-io/shellhub","format":"markdown","source":"go"},{"lang":"es","text":"ShellHub es una pasarela SSH centralizada. Anteriormente a la 0.24.2, GET /api/sessions/:uid devuelve el objeto de sesión completo para cualquier llamador autenticado, sin limitar el alcance por el inquilino del llamador. Un usuario autenticado puede leer registros de sesión (nombre de usuario SSH, UID del dispositivo, IP remota, tipo de terminal, indicador de autenticación, marcas de tiempo) pertenecientes a cualquier otro espacio de nombres. Esta vulnerabilidad se corrige en la versión 0.24.2.","source":"nvd"}],"published":"2026-05-06T23:22:39.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-639"],"affected":[{"ranges":[{"version":"< 0.24.2","status":"affected"}],"vendor":"shellhub-io","product":"shellhub","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.24.2"}],"ecosystem":"Go","package":"github.com/shellhub-io/shellhub","purl":"pkg:golang/github.com/shellhub-io/shellhub","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.24.2"}],"ecosystem":"Go","package":"github.com/shellhub-io/shellhub","purl":"pkg:golang/github.com/shellhub-io/shellhub","source":"go"},{"ranges":[{"status":"affected","fixed":"0.24.2"}],"vendor":"shellhub","product":"shellhub","cpe":"cpe:2.3:a:shellhub:shellhub:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/shellhub-io/shellhub/security/advisories/GHSA-9w9c-9w8m-w89q","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44423","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/shellhub-io/shellhub","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-14T12:50:34.800Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44423","url":"https://www.cve.org/CVERecord?id=CVE-2026-44423","licence":"CVE Terms of Use","modified":"2026-05-14T12:50:40.262Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9w9c-9w8m-w89q","url":"https://github.com/advisories/GHSA-9w9c-9w8m-w89q","licence":"CC-BY-4.0","modified":"2026-07-21T13:57:29.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5302","url":"https://pkg.go.dev/vuln/GO-2026-5302","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:32.485Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44423","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44423","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:21.672Z","epss":{"score":0.00246,"percentile":0.16911,"date":"2026-12-01T12:00:22.000Z"}}