ShellHub CVE-2026-44423
MEDIUMSeverity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Network-accessible HTTP API (AV:N), trivial single-request exploit (AC:L), requires any valid account (PR:L), read-only IDOR so I:N and A:N, no scope change (S:U), full session record disclosure (C:H).
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
3DescriptionGitHub Advisory
Summary
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.
Severity
CVSS 3.1: 7.5 (High) CWE-639
Affected versions
ShellHub 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.
Root cause
api/services/session.go:37-44 - GetSession resolves the session by UID without any tenant filter:
func (s *service) GetSession(ctx context.Context, uid models.UID) (*models.Session, error) {
session, err := s.store.SessionResolve(ctx, store.SessionUIDResolver, string(uid))
// ⚠️ missing: s.store.Options().InNamespace(tenant)
...
}The Authorize middleware only verifies presence of a tenant in the context, not ownership of the requested session.
Proof of concept
Pre-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).
ATTACKER_TOKEN=$(curl -s -X POST http://target/api/login \
-H 'Content-Type: application/json' \
-d '{"username":"attacker","password":"..."}' | jq -r .token)
# Attempt cross-tenant read
curl -i "http://target/api/sessions/<victim-session-uid>" \
-H "Authorization: Bearer $ATTACKER_TOKEN"
# Expected (fixed): HTTP 403/404
# Observed (v0.24.1): HTTP 200 + full session JSONImpact
- 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.
- Enables reconnaissance of other tenants' active users and systems; combined with session recording features, can enable deeper recon.
Suggested fix
api/services/session.go - apply InNamespace in GetSession:
func (s *service) GetSession(ctx context.Context, uid models.UID) (*models.Session, error) {
tenant := gateway.TenantFromContext(ctx)
opts := []store.QueryOption{}
if tenant != nil {
opts = append(opts, s.store.Options().InNamespace(tenant.ID))
}
session, err := s.store.SessionResolve(ctx, store.SessionUIDResolver, string(uid), opts...)
...
}AnalysisAI
Cross-tenant IDOR in ShellHub Community v0.24.1 allows any authenticated user to read SSH session records belonging to other namespaces by supplying an arbitrary session UID to GET /api/sessions/:uid. The GetSession function in api/services/session.go omits the InNamespace tenant filter present elsewhere, so the Authorize middleware validates token presence but not resource ownership. Disclosed data includes SSH username, device UID, remote IP, geolocation, terminal type, authenticated flag, and session timestamps - enabling cross-tenant reconnaissance. No public exploitation is confirmed and EPSS is 0.03% (8th percentile), though the advisory includes a working proof-of-concept curl script.
Technical ContextAI
ShellHub is a Go-based open-source multi-tenant SSH gateway platform for managing SSH access to IoT and edge devices, identified by CPE pkg:go/github.com_shellhub-io_shellhub. The flaw is a CWE-639 (Authorization Through User-Controlled Key) IDOR: the GetSession service method at api/services/session.go:37-44 resolves sessions by caller-supplied UID directly via s.store.SessionResolve(ctx, store.SessionUIDResolver, string(uid)) without appending the InNamespace(tenant.ID) store option that is applied in analogous endpoints such as GetDevice. The JWT-based Authorize middleware confirms a valid tenant claim exists in the request context but performs no object-level ownership check, so the tenant context is available but never consulted during resource resolution. The advisory notes a structurally identical pattern in the companion GetDevice endpoint, indicating a systemic authorization gap across multiple API surface areas rather than an isolated oversight.
RemediationAI
Upgrade ShellHub Community to version 0.24.2, which applies the InNamespace(tenant.ID) store filter in the GetSession function, scoping session resolution to the caller's namespace. The fix and full advisory are documented at https://github.com/shellhub-io/shellhub/security/advisories/GHSA-9w9c-9w8m-w89q. If immediate patching is not feasible, a compensating control is to restrict access to GET /api/sessions/:uid at the reverse proxy or API gateway layer so the endpoint is only reachable from trusted administrative networks - this eliminates the cross-tenant attack path at the cost of blocking any legitimate external session-lookup use. Additionally, audit and rotate session UIDs exposed in application logs, shared session recordings, or public UI URLs to reduce the attacker's ability to enumerate valid victim UIDs without patching. No application-layer workaround short of patching fully mitigates the flaw.
Same technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-9w9c-9w8m-w89q