/

CVE-2026-28447

Severity:

HIGH RISK

(8.1)

Path Traversal in OpenClaw Plugin Installation

CVE-2026-28447

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write Outside Intended Directory

Severity:

HIGH RISK

(8.1)

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

OpenClaw's plugin installation flow contains a path traversal weakness in how it computes plugin install paths from package names.

Maliciously crafted (including scoped) plugin names with .. segments can cause files to be written outside the intended extensions directory when users run the plugin install command, potentially overwriting or planting arbitrary files on the host.

Affected context

This vulnerability affects environments where OpenClaw's plugin system is used to install extensions from package names, including scoped packages.

The issue manifests when the plugin manager derives filesystem paths directly from user-specified package names without robust normalization and validation.

It is most relevant on systems where the OpenClaw process has write permissions outside the extensions directory, making it possible for crafted package names containing .. or similar traversal sequences to resolve to parent directories.

Exploit preconditions

  • Attack surface: The OpenClaw plugin installation command or API that accepts a plugin/package name to install.
  • Required access: Ability to influence the plugin name passed into the installation process (e.g., user running a maliciously suggested install command, compromised plugin registry metadata, or automation that pulls plugin names from untrusted sources).
  • Trigger point: Execution of the plugin installation routine that constructs the target path using the provided package name and writes plugin files to disk.
  • Why exploitation is possible: The installation logic trusts the package name when building file paths, failing to canonicalize and constrain the resulting path to the intended extensions directory, allowing .. traversal sequences to escape the target directory.

Why this happens

The underlying defect is improper neutralization of path traversal sequences when constructing filesystem paths for plugin installation.

Instead of treating the package name as opaque data and rigorously validating the resulting path, the implementation appears to concatenate or otherwise interpolate user-controlled package identifiers directly into a filesystem path.

Without strict normalization (e.g., resolving symbolic components, removing .. segments) and explicit checks that the final resolved path remains within the extensions directory, the system becomes susceptible to CWE-22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal).

This class of bug arises whenever application code assumes that user-supplied path segments will remain within a designated directory purely by convention, rather than enforcing this constraint programmatically.

Potential impact

  • Attackers may write arbitrary files outside the extensions directory within the privileges of the OpenClaw process.
  • Sensitive configuration files or application resources could be overwritten, leading to denial of service or unexpected behavior.
  • Malicious scripts or binaries could be planted in locations that are later executed by other components or administrators.
  • Application integrity may be compromised through unauthorized modification of plugin-related or system files.
  • In some deployments, path traversal–based writes could be combined with other weaknesses to achieve remote code execution.

General mitigation guidance

Mitigation generally focuses on constraining all filesystem operations to a well-defined root directory and treating package names as untrusted input:

  • Normalize and canonicalize computed paths before use, resolving symbolic segments and eliminating . and .. components.
  • Enforce a strict check that the resolved installation path remains a descendant of the configured extensions directory; reject any plugin name that would escape this directory.
  • Avoid directly concatenating user-controlled identifiers into filesystem paths; use safe path-joining utilities that operate on path components rather than raw strings.
  • Apply least-privilege to the OpenClaw runtime, granting write access only to directories that truly require it (ideally isolating the extensions directory).
  • Consider maintaining a whitelist or pattern-based validation for acceptable plugin/package name formats, rejecting unexpected characters or path separators.

These patterns reduce the risk of path traversal regardless of where plugin names originate.

How teams detect issues like this

High-level detection approaches include:

  • Static analysis: Scan for code paths where user-controlled package or plugin names are concatenated with directory paths and used in file write operations, especially without canonicalization and bounds checking.
  • Code review cues: Look for manual string operations (e.g., dir + "/" + name) used to build plugin paths, absence of checks verifying that the final path is within the extensions directory, and lack of input validation for scoped or nested package names.
  • Runtime monitoring: Enable filesystem auditing for the OpenClaw process to flag writes occurring outside the expected extensions directory during plugin installation.
  • Policy enforcement: Integrate secure coding guidelines into CI pipelines, including checks that any path derived from user input is validated against a known-safe root before use.

Automated SAST or linters can help identify risky path construction patterns and missing validation logic early in development.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/d03eca8450dc493b198a88b105fd180895238e57
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-qrq5-wjgg-rvqw
vulncheck.comvulncheck.com/advisories/openclaw-beta-path-traversal-in-plugin-installation-via-package-name

Frequently asked

questions

Exploitability depends on who can influence the plugin name supplied to the installer. If attackers can cause administrators or automation to install plugins using attacker-chosen names (for example through social engineering, malicious documentation, or untrusted plugin indexes), they can attempt to write files outside the extensions directory anywhere the OpenClaw process has write access.

Typically, exploitation requires the ability to trigger a plugin installation with a crafted package name. This is often an authenticated or administrative action, but if external systems or untrusted sources feed plugin names into automated workflows, attackers may gain indirect access to the vulnerable path.

The safest pattern is to centralize path handling such that all plugin installation paths are derived via secure path-joining utilities, immediately canonicalized, and then validated to ensure they remain within a designated extensions root directory. Any name that would escape this directory should be rejected before any file write occurs.

Treat all path components influenced by users or external systems as untrusted, and enforce strict directory confinement through canonicalization and explicit boundary checks. Combine this with least-privilege filesystem permissions, secure coding guidelines, and automated reviews that flag direct string concatenation for filesystem paths or missing validation of resolved paths.

Find out what's already
exploitable in your codebase.