CVE-2026-36044

OS Command Injection in @pensar/apex smart_enumerate Tool

Published May 27, 2026 CVSS 3.1 · 8.8 High EPSS 1.9% KEV · Not listed
Description
@pensar/apex <= 0.0.58 is vulnerable to OS command injection via the smart_enumerate tool. The createSmartEnumerateTool() function in src/core/agent/tools.ts constructs a shell command by concatenating unsanitized values from the extensions array and url parameter into a string passed to Node.js child_process.exec(). Because exec() spawns a shell, shell metacharacters in those values are interpreted by the host shell, resulting in arbitrary OS command execution with the privileges of the running process. NOTE: this is disputed by the Supplier because the report is about intended behavior, as explained in the Security Policy of the pensarai/apex GitHub repo.

Analysis

AI-generated

Technical impact

@pensar/apex versions 0.0.58 and earlier contain a command injection flaw in the smart_enumerate tool. The createSmartEnumerateTool() function builds a shell command by concatenating unsanitized values from an extensions array and a url parameter, then passes the string to Node.js child_process.exec(). Because exec() spawns a shell, any shell metacharacters in those values are interpreted, allowing an attacker to execute arbitrary commands with the privileges of the running process.

Affected Systems

The vulnerability affects the @pensar/apex package for all releases up to and including v0.0.58. Any installation that uses this package and the smart_enumerate tool is potentially exposed; no other vendors or products are listed.

Risk and Exploitability

The CVSS score is 8.8, indicating high severity. EPSS score is 2%, indicating a low probability of exploitation, and the issue is not listed in CISA's KEV catalog. The exploit requires control over the extensions array or url parameter used by the tool. If the tool is exposed to an attacker—whether through a local user, a compromised process, or a remote request—an attacker can inject shell metacharacters to run arbitrary OS commands. The exact attack vector is not explicitly described in the advisory, but the function’s use of exec() implies that any user supplied input can be leveraged if the tool is reachable.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @pensar/apex to version 0.0.59 or newer to remove the vulnerable code.
  • If an upgrade is infeasible, disable or remove the smart_enumerate tool from the deployment so that no unsanitized command execution path remains.
  • Limit the scope of input values by implementing input validation or sanitization on the extensions array and url parameter before they are passed to exec.
  • If the tool must remain in use, apply stricter runtime permissions to the process so that it runs with the least privileges necessary for operation.

Generated by OpenCVE AI on June 18, 2026 at 07:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Title OS Command Injection in @pensar/apex smart_enumerate Tool
Type Values Removed Values Added
Title OS Command Injection Vulnerability in @pensar/apex Smart Enumerate Tool
Type Values Removed Values Added
Title OS Command Injection Vulnerability in @pensar/apex Smart Enumerate Tool
Type Values Removed Values Added
Title OS Command Injection via Unsanitized Parameters in @pensar/apex's smart_enumerate Tool
Type Values Removed Values Added
Description @pensar/apex <= 0.0.58 is vulnerable to OS command injection via the smart_enumerate tool. The createSmartEnumerateTool() function in src/core/agent/tools.ts constructs a shell command by concatenating unsanitized values from the extensions array and url parameter into a string passed to Node.js child_process.exec(). Because exec() spawns a shell, shell metacharacters in those values are interpreted by the host shell, resulting in arbitrary OS command execution with the privileges of the running process. @pensar/apex <= 0.0.58 is vulnerable to OS command injection via the smart_enumerate tool. The createSmartEnumerateTool() function in src/core/agent/tools.ts constructs a shell command by concatenating unsanitized values from the extensions array and url parameter into a string passed to Node.js child_process.exec(). Because exec() spawns a shell, shell metacharacters in those values are interpreted by the host shell, resulting in arbitrary OS command execution with the privileges of the running process. NOTE: this is disputed by the Supplier because the report is about intended behavior, as explained in the Security Policy of the pensarai/apex GitHub repo.
References
Type Values Removed Values Added
First Time appeared Pensar
Pensar apex
Vendors & Products Pensar
Pensar apex
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title OS Command Injection via Unsanitized Parameters in @pensar/apex's smart_enumerate Tool
Weaknesses CWE-78
Type Values Removed Values Added
Description @pensar/apex <= 0.0.58 is vulnerable to OS command injection via the smart_enumerate tool. The createSmartEnumerateTool() function in src/core/agent/tools.ts constructs a shell command by concatenating unsanitized values from the extensions array and url parameter into a string passed to Node.js child_process.exec(). Because exec() spawns a shell, shell metacharacters in those values are interpreted by the host shell, resulting in arbitrary OS command execution with the privileges of the running process.
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AC:L/AV:N/A:H/C:H/I:H/PR:N/S:U/UI:R'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jun 3, 2026, 3:41 AM
Reserved
Apr 6, 2026, 12:00 AM
Status
Deferred
Published
May 27, 2026, 2:16 PM
Modified
Jun 17, 2026, 10:41 AM