/

CVE-2026-102874

Severity:

HIGH RISK

(7.3)

OS Command Injection (CWE-78) in AnyTool Execute Endpoint

CVE-2026-102874

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

HKUDS AnyTool 0.1.0 contains an OS command injection vulnerability in the Execute Endpoint, where user-controlled command or shell arguments reach subprocess.run in the local server.

An attacker who can remotely reach and use the affected endpoint may cause the server to execute unintended operating-system commands. The issue is rated HIGH with a CVSS base score of 7.3, and public exploit information may increase exposure.

Affected context

The vulnerability occurs in AnyTool 0.1.0 deployments that expose the local server's Execute Endpoint and pass externally influenced command or shell values to subprocess.run. Risk depends on network reachability, endpoint authorization, and whether supplied values are incorporated into command execution without strict controls.

Exploit preconditions

  • Attack surface: The remotely reachable Execute Endpoint
  • Required access: Ability to send requests accepted by the endpoint; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the endpoint's command or shell argument
  • Why exploitation is possible: User-influenced command data reaches a subprocess execution API without sufficient separation between data and operating-system instructions

Why this happens

The underlying bug is the unsafe flow of externally influenced input into a process execution function. When command strings or shell-related arguments are constructed from insufficiently trusted data, shell metacharacters or additional command syntax may be interpreted by the operating system.

This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly called OS command injection. CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component is also related because input is passed to a command-processing component without adequate neutralization or structural separation.

Potential impact

  • An attacker may execute arbitrary operating-system commands with the server process's privileges
  • Sensitive files, environment variables, or application data could be read
  • The service could be modified, disrupted, or used for persistence
  • Compromised credentials may enable access to connected systems
  • The host or broader deployment could be affected depending on isolation and privileges

General mitigation guidance

Mitigation generally focuses on preventing untrusted request data from becoming executable command syntax.

Common defensive patterns include:

  • Prefer direct process APIs with fixed executables and structured argument arrays rather than shell command strings
  • Use strict allowlists for permitted operations and argument values
  • Avoid enabling shell interpretation unless it is essential and independently controlled
  • Enforce authentication, authorization, and network restrictions around execution endpoints
  • Run the service with least privilege and isolate it from sensitive host and network resources
  • Apply input validation at the endpoint boundary and retain separation between data and executable instructions
  • Use bounded execution, logging, and resource controls to limit abuse

How teams detect issues like this

Organizations can look for command injection risks through:

  • Static analysis rules identifying request parameters flowing into subprocess, shell execution, or equivalent process APIs
  • Code review signals such as string concatenation, interpolation, or dynamic shell flags near process-launch code
  • Tests that verify rejected metacharacters, unexpected arguments, and unauthorized operations without relying on exploit payloads
  • Runtime monitoring for unusual child processes, command interpreters, outbound connections, or execution requests
  • Policy enforcement requiring approved command allowlists and review of any endpoint that launches operating-system processes
  • Automated code review and software composition tools that flag dangerous subprocess patterns

Sources

SourceLink
github.comgithub.com/HKUDS/AnyTool/
github.comgithub.com/HKUDS/AnyTool/issues/6
vuldb.comvuldb.com/cve/CVE-2026-102874
vuldb.comvuldb.com/submit/949780
vuldb.comvuldb.com/vuln/411510
vuldb.comvuldb.com/vuln/411510/cti

Frequently asked

questions

Yes, the affected Execute Endpoint can be reached remotely when the deployment exposes it and accepts attacker-controlled requests. Practical exploitability still depends on network access and endpoint authorization.

Not necessarily. The key requirement is the ability to submit input that reaches the vulnerable execution path; authentication and access controls determine whether an attacker has that ability.

Avoid passing request-derived strings to a shell. Use fixed commands, structured argument arrays, strict operation allowlists, and strong authorization around any remaining process execution.

Treat command inputs as untrusted data, enforce separation between data and executable instructions, review process-launch code, run services with minimal privileges, and monitor unexpected child-process activity.

Find out what's already
exploitable in your codebase.