/

CVE-2026-130160

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in RepoManager GPG Key

CVE-2026-130160

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-862

Impact:

Arbitrary OS command execution

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

RepoManager's GPG key deletion action can pass a user-controlled key identifier to a shell without shell-safe handling, allowing an authenticated user to execute operating-system commands as the web/PHP process. The risk arises when an attacker can submit a crafted identifier to that action; the advisory does not establish that administrator privileges are required.

Affected context

The vulnerable path is in controllers/Gpg.php, where a user-controlled, array-valued GPG key identifier reaches the deletion action. The risk exists when that value is incorporated into a command string passed through Process::execute() to /bin/sh -c without shell-safe encoding. Whether a particular account can invoke the action depends on the deployment's access policy.

Exploit preconditions

  • Attack surface: The GPG key deletion action in the RepoManager web application
  • Required access: An authenticated account able to invoke the action; an administrator role is not established as a prerequisite
  • Trigger point: Processing a deletion request containing a user-controlled key identifier
  • Why exploitation is possible: The identifier reaches a shell-interpreted command without shell-safe handling

Why this happens

The deletion path treats a user-controlled value as part of a shell command. Filtering HTML characters does not prevent shell interpretation of metacharacters, and passing a command string through proc_open() with /bin/sh -c leaves the shell to interpret that input. This is CWE-78: Improper Neutralization of Special Elements used in an OS Command. CWE-862: Missing Authorization is also associated with the vulnerability, but the advisory does not establish that an authorization bypass or administrator-only access is required for exploitation.

Potential impact

  • An attacker could execute OS commands with the privileges of the web/PHP process.
  • A compromise could expose secrets accessible to that process.
  • An attacker may be able to alter or poison packages in the repository.
  • Depending on process privileges and environment, compromise could affect other services or data.

General mitigation guidance

Mitigation patterns focus on avoiding shell interpretation of user-controlled values and limiting the consequences of a compromised web process.

  • Prefer APIs that pass an executable and discrete arguments directly, without invoking a shell.
  • Where external commands are necessary, use well-defined argument handling and strict allowlists for accepted identifiers; do not rely on HTML filtering as command protection.
  • Validate input types and structure, including rejecting unexpected array values, and enforce authorization checks appropriate to the action.
  • Run the application with least privilege and restrict its access to secrets, package storage, and other system resources.

How teams detect issues like this

  • Use static analysis to identify command-execution APIs, shell invocations, and user-controlled data flowing into command strings.
  • Review code paths where request parameters reach deletion or other administrative actions, checking input types, authorization, and argument handling.
  • Apply code-review and CI policies that flag shell-based command construction and require documented justification for process execution.
  • Monitor application and process logs for unusual invocations or unexpected changes to repository packages.

Sources

SourceLink
github.comgithub.com/lbr38/repomanager/commit/d380579c84accf1786934deee245650bbc68a562
github.comgithub.com/lbr38/repomanager/pull/403
github.comgithub.com/lbr38/repomanager/releases/tag/5.13.3
github.comgithub.com/lbr38/repomanager/security/advisories/GHSA-c78w-g4rj-q6q7

Frequently asked

questions

The issue can allow command execution as the web/PHP process when the vulnerable deletion action receives an unsafe identifier. Further impact depends on that process's privileges and accessible resources.

Authentication is required. The advisory does not establish an administrator role as a prerequisite; the account must be able to reach the action under the deployment's access policy.

Avoid passing user-controlled values through a shell. Prefer direct process APIs with discrete arguments, alongside strict input validation and appropriate authorization checks.

Reduce reliance on shell commands, review data flows into process-execution APIs, enforce least privilege, and include static-analysis and code-review checks for unsafe command construction.

Find out what's already
exploitable in your codebase.