/

CVE-2026-111638

Severity:

HIGH RISK

(7.7)

Missing Authorization (CWE-862) in sshportal Shell

CVE-2026-111638

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Private Key Disclosure and ACL Bypass

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

sshportal's management shell does not adequately authorize the key show command for non-admin users, allowing authenticated users to retrieve decrypted backend private SSH keys. An attacker who can access the management shell may use predictable key names to obtain credentials, connect directly to backend hosts, and bypass intended access controls and session recording.

sshportal's management shell does not adequately authorize the key show command for non-admin users, allowing authenticated users to retrieve decrypted backend private SSH keys. An attacker who can access the management shell may use predictable key names to obtain credentials, connect directly to backend hosts, and bypass intended access controls and session recording.

Affected context

The vulnerability affects sshportal deployments using the management shell's key show command. It becomes risky when an authenticated user who is not an administrator can invoke the command and retrieve decrypted private keys associated with predictable backend key names, such as default or host.

The vulnerability affects sshportal deployments using the management shell's key show command. It becomes risky when an authenticated user who is not an administrator can invoke the command and retrieve decrypted private keys associated with predictable backend key names, such as default or host.

Exploit preconditions

  • Attack surface: sshportal management shell
  • Required access: An authenticated sshportal account, including a non-admin account
  • Trigger point: Invocation of the key show command with an available or predictable key name
  • Why exploitation is possible: Authorization checks do not adequately restrict access to decrypted backend private keys
  • Attack surface: sshportal management shell
  • Required access: An authenticated sshportal account, including a non-admin account
  • Trigger point: Invocation of the key show command with an available or predictable key name
  • Why exploitation is possible: Authorization checks do not adequately restrict access to decrypted backend private keys

Why this happens

The underlying defect is an authorization enforcement failure. The management shell exposes a sensitive key-retrieval operation without consistently verifying that the requesting principal has administrative permission to access the selected private key. This maps to CWE-862: Missing Authorization, where authenticated access is incorrectly treated as sufficient authorization for a privileged action.

The underlying defect is an authorization enforcement failure. The management shell exposes a sensitive key-retrieval operation without consistently verifying that the requesting principal has administrative permission to access the selected private key. This maps to CWE-862: Missing Authorization, where authenticated access is incorrectly treated as sufficient authorization for a privileged action.

Potential impact

  • An attacker may obtain decrypted backend private SSH keys
  • Exposed keys could allow direct connections to backend hosts
  • Attackers could bypass sshportal ACLs and intended routing controls
  • Session recording and centralized monitoring could be avoided
  • Compromised backend hosts could enable lateral movement or data access
  • An attacker may obtain decrypted backend private SSH keys
  • Exposed keys could allow direct connections to backend hosts
  • Attackers could bypass sshportal ACLs and intended routing controls
  • Session recording and centralized monitoring could be avoided
  • Compromised backend hosts could enable lateral movement or data access

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the operation and object level, rather than relying only on authentication or command availability.

Common defensive patterns include:

  • Require explicit administrative authorization before private-key retrieval
  • Apply deny-by-default policies to sensitive management commands
  • Validate authorization for each requested key object and backend scope
  • Avoid exposing decrypted private keys when an authenticated connection or delegated credential can be used instead
  • Reduce trust in predictable user-supplied key names through server-side object mapping
  • Restrict backend credentials using least privilege, limited scope, and short-lived alternatives where practical
  • Record and alert on sensitive key-access attempts, including denied requests

Mitigation generally focuses on enforcing authorization at the operation and object level, rather than relying only on authentication or command availability.

Common defensive patterns include:

  • Require explicit administrative authorization before private-key retrieval
  • Apply deny-by-default policies to sensitive management commands
  • Validate authorization for each requested key object and backend scope
  • Avoid exposing decrypted private keys when an authenticated connection or delegated credential can be used instead
  • Reduce trust in predictable user-supplied key names through server-side object mapping
  • Restrict backend credentials using least privilege, limited scope, and short-lived alternatives where practical
  • Record and alert on sensitive key-access attempts, including denied requests

How teams detect issues like this

Organizations can identify similar authorization weaknesses through:

  • Static analysis and policy checks for management commands that access secrets without nearby authorization enforcement
  • Code review of command handlers, object lookups, role checks, and admin-only paths
  • Tests that exercise privileged commands with authenticated non-admin identities
  • Negative authorization tests covering predictable names, alternate identifiers, and backend scopes
  • Runtime monitoring for private-key retrieval, unusual key-name enumeration, and direct backend connections
  • Policy enforcement requiring centralized authorization middleware for sensitive operations

Automated security review tools may help flag missing role checks, but authorization behavior should also be verified with targeted integration tests.

Organizations can identify similar authorization weaknesses through:

  • Static analysis and policy checks for management commands that access secrets without nearby authorization enforcement
  • Code review of command handlers, object lookups, role checks, and admin-only paths
  • Tests that exercise privileged commands with authenticated non-admin identities
  • Negative authorization tests covering predictable names, alternate identifiers, and backend scopes
  • Runtime monitoring for private-key retrieval, unusual key-name enumeration, and direct backend connections
  • Policy enforcement requiring centralized authorization middleware for sensitive operations

Automated security review tools may help flag missing role checks, but authorization behavior should also be verified with targeted integration tests.

Sources

SourceLink
github.comgithub.com/moul/sshportal/blob/v1.19.5/pkg/bastion/shell.go#L1513-L1584
hackmd.iohackmd.io/@hieuPenguinnn/sshportal-key-show-privkey-disclosure
vulncheck.comvulncheck.com/advisories/sshportal-through-1.19.5-missing-authorization-in-key-show-command-exposes-private-keys

Frequently asked

questions

It may be exploitable through the sshportal management interface when that interface is reachable by an authenticated user. Exploitation does not necessarily require administrative privileges.

The attacker generally needs a valid sshportal account with access to the management shell. A non-admin account may be sufficient if the vulnerable command is available.

Enforce deny-by-default, server-side authorization for every private-key retrieval request, and avoid returning decrypted private keys when a narrowly scoped alternative is available.

Use centralized role and object-level authorization, test privileged commands with lower-privileged identities, restrict credential scope, and monitor sensitive secret-access operations.

It may be exploitable through the sshportal management interface when that interface is reachable by an authenticated user. Exploitation does not necessarily require administrative privileges.

The attacker generally needs a valid sshportal account with access to the management shell. A non-admin account may be sufficient if the vulnerable command is available.

Enforce deny-by-default, server-side authorization for every private-key retrieval request, and avoid returning decrypted private keys when a narrowly scoped alternative is available.

Use centralized role and object-level authorization, test privileged commands with lower-privileged identities, restrict credential scope, and monitor sensitive secret-access operations.

Find out what's already
exploitable in your codebase.