/

CVE-2026-120461

Severity:

HIGH RISK

(8.8)

Cross-Workspace Auth Bypass (CWE-639) in Jpom SSH Batch

CVE-2026-120461

Deferred

Vulnerability type

Category:

Cross-Workspace Authorization Bypass

CWE:

CWE-639

Impact:

Unauthorized command execution on SSH hosts across workspace boundaries

Severity:

HIGH RISK

(8.8)

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

Jpom's SSH batch-command endpoint can use command-template and SSH-node IDs without checking that those resources belong to the authenticated user's workspace. A user with SSH command execution permission in one workspace may therefore run commands on SSH hosts in other workspaces if they can provide the corresponding IDs.

Affected context

The issue occurs in the POST /node/ssh_command/batch endpoint when it resolves command templates and SSH nodes by ID without applying workspace-level authorization checks. It is risky in deployments where users have SSH command execution permission in one workspace and SSH resources or stored credentials exist in other workspaces.

Exploit preconditions

  • Attack surface: The authenticated SSH batch-command endpoint
  • Required access: An account with SSH command execution permission in at least one workspace
  • Trigger point: Processing a batch request that references command-template and SSH-node IDs
  • Why exploitation is possible: Resource lookup is based on IDs without confirming that the resources belong to the user's authorized workspace

Why this happens

The endpoint treats user-supplied resource identifiers as sufficient to locate command templates and SSH nodes, but does not consistently verify the caller's authority over those resources. This is an authorization bypass through a user-controlled key, mapping to CWE-639. Authorization should be checked against the resource and workspace, not inferred from possession of an ID or permission in a different workspace.

Potential impact

  • Users may execute commands on SSH hosts outside their authorized workspace
  • Stored SSH credentials may be used to access systems across workspace boundaries
  • Commands could disrupt services, alter data, or expose information on affected hosts
  • A compromised account may enable broader lateral movement, depending on host access and network controls

General mitigation guidance

Defensive patterns focus on enforcing authorization at every resource lookup and command-execution boundary.

  • Scope template and node queries to the caller's authorized workspace
  • Verify ownership and permission for each referenced resource before using stored credentials or executing commands
  • Derive workspace scope from trusted server-side identity and authorization context rather than request-supplied IDs
  • Apply least privilege to user roles, SSH accounts, and the systems reachable by the application
  • Use secure-by-default resource APIs that require an authorization context for lookups and actions

How teams detect issues like this

  • Review endpoint code and shared lookup helpers for ID-based resource access that omits workspace or ownership checks
  • Use static analysis or code-review rules to flag sensitive operations driven by request-supplied identifiers without authorization checks
  • Test authorization policies with resources belonging to different workspaces, including batch operations
  • Monitor audit logs for command executions where the user's workspace and the target resource's workspace do not match
  • Enforce centralized authorization policies for SSH execution and cross-workspace resource access

Sources

SourceLink
github.comgithub.com/dromara/Jpom/blob/v2.11.12/modules/server/src/main/java/org/dromara/jpom/controller/ssh/CommandInfoController.java#L176-L184
github.comgithub.com/dromara/Jpom/blob/v2.11.12/modules/server/src/main/java/org/dromara/jpom/service/node/ssh/SshCommandService.java#L167-L169
github.comgithub.com/dromara/Jpom/commit/ff09fe8095a792cea9c4b8babd93a333655d0a28
github.comgithub.com/dromara/Jpom/issues/120
vulncheck.comvulncheck.com/advisories/jpom-through-2.11.12-cross-workspace-authorization-bypass-via-node-ssh-command-batch

Frequently asked

questions

It can be triggered through the SSH batch-command endpoint by an authenticated user who meets the permission requirements; the description does not indicate that it is available to unauthenticated users.

The user needs SSH command execution permission in at least one workspace. The flaw concerns access to resources in other workspaces through their IDs.

Enforce workspace-scoped authorization for every template and node lookup, and verify permissions again before using credentials or executing commands.

Apply centralized, deny-by-default authorization to resource operations, and test that identifiers from another workspace cannot cross workspace boundaries.

Find out what's already
exploitable in your codebase.