/

CVE-2026-90618

Severity:

HIGH RISK

(7.3)

OS Command Injection (CWE-78) in PentestAgent Runtime

CVE-2026-90618

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.3)

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

A command injection flaw in GH05TCREW PentestAgent affects the LocalRuntime.execute_command function in the runtime component. A remote attacker may be able to influence command execution and run operating-system commands when externally controlled input reaches this function.

Affected context

The issue occurs in PentestAgent deployments that expose or indirectly invoke the LocalRuntime execution path and allow attacker-controlled data to reach command construction or execution. Risk is higher when the runtime service is remotely reachable and operates with permissions that extend beyond the minimum required for its task.

Exploit preconditions

  • Attack surface: The LocalRuntime command-execution functionality in runtime/runtime.py
  • Required access: Remote access to an interface, workflow, or service that can invoke the affected runtime path
  • Trigger point: Processing attacker-influenced input by LocalRuntime.execute_command
  • Why exploitation is possible: Input may be incorporated into an operating-system command without sufficient separation between data and command syntax

Why this happens

The underlying bug is an insufficiently constrained interface between application-controlled input and an operating-system command interpreter. When untrusted values are concatenated into commands or passed through shell-sensitive execution paths, command syntax can be interpreted as executable instructions rather than ordinary data. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements used in a Command describing the broader command-injection class.

Potential impact

  • An attacker could execute arbitrary operating-system commands in the PentestAgent runtime context.
  • The vulnerability may expose files, environment variables, credentials, or operational data.
  • A compromised runtime could be used to alter agent behavior or interfere with security workflows.
  • The attacker could potentially move laterally if the runtime has network access or excessive privileges.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from application-controlled command paths and reducing the trust placed in external input.

Common defensive patterns include:

  • Prefer direct process APIs that pass an executable and an argument array without invoking a shell.
  • Use strict allowlists for permitted commands and arguments where dynamic execution is required.
  • Validate inputs against expected types, formats, and ranges before they reach execution logic.
  • Avoid constructing commands through string concatenation or interpolation.
  • Run the runtime with least-privilege operating-system and network permissions.
  • Isolate command execution and apply filesystem, process, and secret-access restrictions where practical.
  • Treat remote callers and generated agent content as untrusted by default.

How teams detect issues like this

High-level detection can combine:

  • Static analysis for shell invocation, subprocess APIs, command-string concatenation, and interpolation involving request or workflow data.
  • Code review checks for execution functions that accept unrestricted strings or forward user-controlled values.
  • Runtime monitoring of child-process creation, unusual command interpreters, unexpected parent-child process relationships, and abnormal outbound connections.
  • Policy enforcement requiring approved executable paths, argument schemas, and least-privilege service identities.
  • Automated code-review or security-scanning tools configured to flag command injection patterns and unsafe process execution.

Sources

SourceLink
github.comgithub.com/GH05TCREW/pentestagent/
github.comgithub.com/GH05TCREW/pentestagent/issues/91
github.comgithub.com/GH05TCREW/pentestagent/pull/100
vuldb.comvuldb.com/cve/CVE-2026-90618
vuldb.comvuldb.com/submit/914809
vuldb.comvuldb.com/vuln/403199
vuldb.comvuldb.com/vuln/403199/cti

Frequently asked

questions

The description indicates that the attack may be performed remotely. Exploitability depends on whether a remotely reachable interface can invoke the affected LocalRuntime function with attacker-influenced input.

The required access level depends on the PentestAgent deployment and its exposed interfaces. Any remote identity or workflow permitted to reach the vulnerable execution path may be relevant.

Avoid shell-based command construction, use direct process execution with structured argument arrays, and restrict executable and argument choices to explicit allowlists.

Treat all remote and agent-generated content as untrusted, validate it before use, enforce least privilege, monitor child-process activity, and include command-injection checks in code review and automated analysis.

Find out what's already
exploitable in your codebase.