/

CVE-2026-85685

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in AgentScope Workspace API

CVE-2026-85685

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Disclosure and Workspace Manipulation

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

A path traversal vulnerability in AgentScope's LocalWorkspace.add_skill allows an untrusted source path to reference arbitrary directories on the server. When the skill operation is reachable and the supplied path is accepted, files may be copied into the agent workspace and exposed through skill listing functionality.

Affected context

The vulnerability occurs in AgentScope deployments that use LocalWorkspace.add_skill and accept a caller-controlled skill_path parameter. The risk is present when the parameter is not constrained to an approved skills directory and the service account can read the referenced server paths. Copied content may then become accessible through the agent workspace's skill-listing behavior.

Exploit preconditions

  • Attack surface: The workspace skill-management interface or request path invoking LocalWorkspace.add_skill
  • Required access: Ability to submit or influence a skill-addition request
  • Trigger point: Processing of the skill_path parameter during skill installation
  • Why exploitation is possible: The source path is not sufficiently confined to an approved directory, allowing directory traversal or arbitrary server-directory selection when filesystem permissions permit access

Why this happens

The underlying bug is improper limitation of a filesystem path derived from external input. The application uses the supplied source path for file-copy operations without reliably enforcing that it remains beneath an intended trusted base directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive files may be copied into an agent workspace
  • Unauthorized content may become visible through skill listings
  • Workspace integrity could be altered by introducing unapproved files
  • Downstream agents or tools could consume attacker-controlled skill content
  • File permissions and deployment configuration could increase the scope of disclosure

General mitigation guidance

Mitigation generally focuses on making filesystem boundaries explicit and reducing trust in caller-controlled paths.

Common defensive patterns include:

  • Accepting logical skill identifiers rather than arbitrary filesystem paths
  • Resolving paths against a fixed allowlisted base directory and verifying the final canonical path remains within it
  • Rejecting absolute paths, traversal components, symbolic-link escapes, and unexpected path formats
  • Applying strict schema and policy validation before any copy operation
  • Running the service with least-privilege filesystem permissions and separating sensitive directories from workspace access
  • Using isolated, read-only source locations where practical and limiting which workspace content can be listed or consumed

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules for filesystem APIs receiving request parameters or other untrusted input
  • Code review checks for missing canonicalization, base-directory containment checks, and symlink handling
  • Tests that verify absolute paths, parent-directory references, encoded separators, and symlinked locations are rejected
  • Runtime policy enforcement that restricts file-copy operations to approved directories
  • Audit logging and monitoring for unusual skill paths, unexpected source directories, or bulk workspace changes

Automated code review and security scanning tools may help identify these patterns during development.

Sources

SourceLink
github.comgithub.com/agentscope-ai/agentscope
github.comgithub.com/agentscope-ai/agentscope/blob/v2.0.7.post1/src/agentscope/workspace/_local_workspace.py
github.comgithub.com/agentscope-ai/agentscope/issues/2069
vulncheck.comvulncheck.com/advisories/agentscope-through-2.0.7-post1-arbitrary-directory-copy-via-add-skill

Frequently asked

questions

It may be exploitable through a remote or service-facing skill-management interface when an attacker can influence the skill_path parameter. The exact scope depends on how the AgentScope workspace API is exposed and authenticated.

An attacker generally needs permission to invoke the affected skill-addition operation or otherwise control its path parameter. The service account must also be able to read the selected source directory.

Replace arbitrary path acceptance with approved logical identifiers or an allowlisted base directory, then canonicalize and verify containment before copying files.

Treat all filesystem paths from requests as untrusted, enforce canonical path boundaries and symlink protections, use least-privilege service accounts, and test path-validation policies in CI.

Find out what's already
exploitable in your codebase.