/

CVE-2026-72713

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in XAgent Workspace Files

CVE-2026-72713

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Sensitive Information Disclosure

Severity:

HIGH RISK

(7.5)

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

XAgent has a path traversal vulnerability in its workspace file endpoint, where insufficient validation of the file_name form field may allow users to access files outside the intended workspace. Self-registered users or users with default credentials could potentially read application secrets, database credentials, and system files from the host.

Affected context

The vulnerability occurs in XAgent deployments that expose the /workspace/file handler and accept user-controlled file names without enforcing containment within the designated workspace directory. Risk is higher when account registration does not require email verification, default credentials remain active, or the service has access to sensitive host-mounted files.

Exploit preconditions

  • Attack surface: The XAgent /workspace/file endpoint
  • Required access: A self-registered account or valid credentials, including potentially unchanged default credentials
  • Trigger point: Processing the file_name form field
  • Why exploitation is possible: Parent-directory segments are accepted without canonicalizing the path and verifying that the resolved path remains within the permitted workspace

Why this happens

The underlying bug is improper limitation of a pathname to an intended directory, which maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The handler appears to combine a trusted workspace path with attacker-controlled filename data without applying canonicalization and a reliable containment check before file access. As a result, path syntax can cause the application to resolve files outside its authorized directory.

Potential impact

  • Attackers may read application configuration and secret material
  • Database credentials or API keys could be disclosed
  • System files may be exposed
  • Disclosure of sensitive files could enable follow-on compromise
  • Host or container information may assist lateral movement

General mitigation guidance

Mitigation generally focuses on reducing trust in client-supplied paths and enforcing directory boundaries at the point of access.

Common defensive patterns include:

  • Accepting workspace-relative file identifiers rather than arbitrary path strings
  • Canonicalizing the candidate path before access
  • Verifying that the resolved path remains within the intended workspace using a robust containment check
  • Rejecting traversal syntax, absolute paths, unexpected separators, and symbolic-link escapes where appropriate
  • Applying strict allowlists for permitted files or file extensions
  • Requiring verified accounts and removing default credentials
  • Running the service with least-privilege filesystem permissions and limiting sensitive host mounts
  • Returning generic errors that do not disclose filesystem details

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem operations that concatenate user input with directory paths
  • Code review checks for missing canonicalization and containment validation
  • Tests using traversal variants, encoded separators, absolute paths, and symbolic-link scenarios
  • Web application policies that alert on suspicious parent-directory sequences in file parameters
  • Runtime monitoring for unexpected reads outside approved workspace directories
  • Automated security review tools that flag unchecked path construction and weak authentication defaults

Sources

SourceLink
github.comgithub.com/OpenBMB/XAgent
github.comgithub.com/OpenBMB/XAgent/commit/26f2b6edc75127af524f027c022b382967178e3a
github.comgithub.com/OpenBMB/XAgent/issues/429
github.comgithub.com/OpenBMB/XAgent/pull/432
vulncheck.comvulncheck.com/advisories/xagent-path-traversal-arbitrary-file-read-via-workspace-file

Frequently asked

questions

Yes, where the XAgent workspace file endpoint is network-accessible and an attacker can authenticate through self-registration or available credentials.

Not necessarily. The described attack may be possible with a standard self-registered account or default credentials, depending on deployment configuration.

Treat file names as untrusted identifiers, resolve them safely, and enforce that the resulting path remains within the intended workspace before reading it.

Combine strict path validation with verified-account requirements, removal of default credentials, least-privilege filesystem permissions, and automated tests for traversal and filesystem-boundary bypasses.

Find out what's already
exploitable in your codebase.