/

CVE-2026-26323

Severity:

HIGH RISK

(8.8)

Command Injection in OpenClaw Contributor Maintenance Script

CVE-2026-26323

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution in Maintainer/CI Environment

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

A command injection vulnerability in the OpenClaw maintainer script scripts/update-clawtributors.ts allows arbitrary shell commands to be executed when processing crafted Git commit author metadata.

The issue only affects environments where contributors, maintainers, or CI systems run bun scripts/update-clawtributors.ts in a repository containing malicious author email fields; normal CLI usage via npm i -g openclaw is not impacted.

Affected context

This vulnerability occurs in the OpenClaw development and maintenance workflow, specifically when the scripts/update-clawtributors.ts script is executed in a local source checkout or CI environment.

It relies on Git history being treated as trusted input: the script reads commit author metadata from git log, derives a GitHub login, and interpolates that value into a shell command executed via execSync.

Only environments that run this script against a repository containing malicious author email values are exposed; users of the published CLI package who do not invoke this script are not directly affected.

Exploit preconditions

  • Attack surface: Local development or CI environment where scripts/update-clawtributors.ts is executed.
  • Required access: Ability to introduce or control commits in the repository, including author email fields (e.g., through contributing, compromising a contributor account, or poisoning a fork that maintainers run the script against).
  • Trigger point: Manual or automated execution of bun scripts/update-clawtributors.ts in a repository whose Git history includes a maliciously crafted author email.
  • Why exploitation is possible: The script derives a GitHub login from git log author metadata and interpolates it directly into a shell command executed via execSync without sanitization or escaping, allowing shell metacharacters in the author email to break out of the intended command context.

Why this happens

The underlying issue is an instance of CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

The script implicitly trusts Git commit author metadata, constructs a command string using this unvalidated data, and then invokes it via execSync.

Because shell command construction occurs through naive string interpolation rather than safe argument passing or escaping, an attacker-controlled author email can inject shell metacharacters, append additional commands, or alter command behavior.

The bug pattern is treating non-validated metadata (Git log output) as safe when constructing OS-level commands.

Potential impact

  • Execution of arbitrary shell commands under the privileges of the maintainer, contributor, or CI runner.
  • Exfiltration of repository contents, SSH keys, or other sensitive files present on the development/CI machine.
  • Modification or deletion of local source code, build artifacts, or configuration files.
  • Poisoning of generated contributor metadata or documentation produced by the script.
  • Potential lateral movement within the maintainer's environment, depending on local tooling and access.

General mitigation guidance

Effective mitigations focus on eliminating direct string-based command construction and reducing trust in metadata sources:

  • Prefer OS command APIs that accept argument arrays (e.g., execFile, spawn with argument lists) instead of concatenated shell strings, so user-controlled values are not interpreted by a shell.
  • Treat Git metadata (author names, emails, commit messages) as untrusted input and apply strict validation or whitelisting before using it in commands or scripts.
  • Use robust escaping/quoting utilities if values must be passed through a shell, ensuring shell metacharacters are neutralized.
  • Decouple contributor data generation from shell invocation where possible (e.g., use HTTP APIs via native libraries instead of shelling out to CLI tools).
  • Run maintenance scripts in minimally privileged environments (e.g., isolated CI jobs or containers) with restricted filesystem and credential access.

How teams detect issues like this

Organizations can identify similar vulnerabilities through a combination of static analysis and process checks:

  • Configure static analysis or linters to flag dynamic shell execution patterns such as execSync, exec, or spawn with a single concatenated string, especially when variables are interpolated.
  • During code review, scrutinize any use of Git output, environment variables, or other external metadata being fed into command strings or shell pipelines.
  • Establish secure coding guidelines that discourage shell command construction with string concatenation and mandate safe process execution APIs.
  • Incorporate security-focused checks into CI that scan for known dangerous patterns (e.g., execSync(\...${var}...\)) and require explicit justification or mitigation.
  • Optionally use automated SAST tools tuned with custom rules for command injection risks in scripting utilities and build tooling.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/a429380e337152746031d290432a4b93aa553d55
github.comgithub.com/openclaw/openclaw/releases/tag/v2026.2.14
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-m7x8-2w3w-pr42

Frequently asked

questions

Not in the usual sense. The vulnerable script is a maintainer/dev tool and is not part of the shipped CLI. Exploitation requires someone to run scripts/update-clawtributors.ts in a repository containing malicious commit metadata.

An attacker needs to influence the Git history consumed by the script, particularly the author email fields. This can happen through contributing malicious commits, compromising a contributor account, or providing a poisoned fork that maintainers or CI jobs run the script against.

Avoid constructing shell commands by concatenating untrusted data into command strings. Use process execution APIs that separate the executable and its arguments, validate and normalize any external metadata, and only pass sanitized values as arguments, not as part of a shell expression.

Adopt secure coding standards for build and maintenance scripts: treat all metadata (Git logs, environment variables, configuration fields) as untrusted, forbid direct exec* string interpolation, require argument-based process APIs, and integrate automated checks in CI to flag command injection patterns before changes are merged.

Find out what's already
exploitable in your codebase.