/

CVE-2026-62229

Severity:

HIGH RISK

(8.8)

Path Traversal Auth Bypass (CWE-22) in OpenClaw Exec

CVE-2026-62229

Analyzed

Vulnerability type

Category:

Path Traversal / Authorization Bypass

CWE:

CWE-22

Impact:

Privilege Escalation and Unauthorized Action Execution

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

OpenClaw versions prior to 2026.5.18 contain an authorization bypass caused by unsafe path and glob matching in an execution allowlist feature.

By crafting input paths that traverse or evade allowlist glob patterns, lower‑trust callers may execute or persist actions beyond their intended authorization when the feature is enabled.

Affected context

The vulnerability arises in deployments of OpenClaw that rely on an execution allowlist implemented using glob pattern matching on paths.

It becomes relevant when:

  • The exec allowlist feature is enabled
  • Authorization decisions are tied directly to glob evaluation on user‑controlled paths
  • Callers with restricted roles can supply or influence execution paths

In such contexts, incorrectly constrained glob logic can be traversed or bypassed, expanding effective permissions beyond what policy authors intended.

Exploit preconditions

  • Attack surface: Interfaces that accept execution paths or resource identifiers filtered through the exec allowlist (CLI, API, job runners, plugins).
  • Required access: Ability to invoke OpenClaw operations as a lower‑trust or partially authorized caller and provide path-like input parameters.
  • Trigger point: Submission of carefully crafted paths that interact with the glob patterns used in the allowlist, such as nested segments, traversal‑like constructs, or pattern overlaps.
  • Why exploitation is possible: The glob‑based matching is applied to user‑influenced paths without robust normalization and constraint checking, allowing path structures that still match allowlist patterns while semantically referencing resources or actions outside the intended authorized scope.

Why this happens

This issue is fundamentally a path validation and authorization flaw consistent with CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

The system assumes that glob patterns over paths are sufficient to restrict which actions can be executed, but the matching logic does not rigorously constrain the resolved targets to a truly restricted set.

Without comprehensive normalization (e.g., resolving "..", symbolic constructs, and ambiguous segments) and strong bounds enforcement, glob allowlists can be abused so that user‑controlled paths still appear "allowed" while actually pointing to unintended execution targets or policy scopes.

In effect, authorization is delegated to a fragile pattern‑matching mechanism rather than tightly bound to canonical resource identifiers and explicit permissions.

Potential impact

  • Lower‑trust users may execute actions that are meant only for higher‑privilege roles.
  • Unauthorized persistence or scheduling of tasks in sensitive environments can occur.
  • Modification or access to resources outside the intended allowlisted scope may be possible.
  • Escalation from limited operational roles to broader system control can happen.
  • Policy authors may believe restrictions are enforced while silently granting broader access.

General mitigation guidance

Effective mitigation focuses on strengthening path handling and decoupling authorization from fragile glob assumptions.

Useful general patterns include:

  • Canonically normalizing all path inputs before policy evaluation, ensuring removal or resolution of traversal constructs and ambiguous segments.
  • Enforcing strict restrictions on resolved targets rather than relying solely on glob patterns; for example, binding operations to well‑defined base directories or resource namespaces.
  • Designing allowlists around explicit resource identifiers or capability sets rather than user‑controlled paths wherever possible.
  • Applying least‑privilege principles so that execution features exposed to lower‑trust callers are scoped to minimal and clearly enumerated actions.
  • Treating any path‑based filters as defense‑in‑depth, not the primary enforcement mechanism, and layering additional authorization checks.

How teams detect issues like this

Organizations can identify and monitor this class of vulnerability through several complementary strategies:

  • Static analysis or custom linting rules that flag authorization checks implemented purely via glob or pattern matching on user‑controlled paths.
  • Code review practices that require canonical path resolution and explicit bounds checking for any feature that restricts execution or resource access by path.
  • Policy validation frameworks that test allowlists with adversarial and edge‑case paths to surface pattern overlaps or unexpected matches.
  • Configuration and CI/CD checks that highlight overly broad glob patterns in security‑sensitive allowlists, prompting manual inspection.
  • Runtime monitoring for unusual execution requests, such as lower‑trust roles invoking actions from unexpected directories or namespaces.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-34mr-7r3m-gfg7
vulncheck.comvulncheck.com/advisories/openclaw-authorization-bypass-via-glob-matching

Frequently asked

questions

Exploitability depends on how widely the exec allowlist is used and which interfaces expose path‑driven execution. In environments where lower‑trust roles frequently supply paths to trigger actions, the exposure can be significant.

An attacker must be able to act as a caller with some level of access to the affected exec feature and control or influence the path parameters. Full administrative access is not required; exploitation typically occurs from lower‑trust or restricted roles.

The safest approach is to normalize and strictly constrain all paths before any authorization decision, and to move away from glob‑only allowlists toward explicit resource or action identifiers tied to well‑defined permissions. Defense‑in‑depth checks should validate that resolved targets always fall within intended boundaries.

Future designs should treat user‑controlled paths as untrusted data, enforce canonicalization and boundary checks, avoid using flexible pattern matching as the primary enforcement mechanism, and subject authorization logic to systematic threat modeling, test suites with adversarial inputs, and policy reviews.

Find out what's already
exploitable in your codebase.