/

CVE-2026-120013

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in agent_memory Secret Resolution

CVE-2026-120013

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized access to cross-tenant credentials

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

The agent_memory module uses a caller-supplied tenant value to construct filesystem paths for resolving secrets without first validating that value. If a caller can supply a path-traversal value and secrets for other tenants are mounted in the expected location, the path may escape the intended tenant directory and expose their credentials.

Affected context

The issue occurs in agent_memory when create_client(tenant=...) uses the tenant parameter to build a path for secret resolution. It becomes risky when the parameter can be influenced by an untrusted caller and the resulting path is used to access mounted secrets without confinement to the intended tenant directory.

Exploit preconditions

  • Attack surface: The agent_memory client-creation path that resolves tenant secrets from the filesystem
  • Required access: Ability to call create_client with a tenant value that is not trusted or constrained
  • Trigger point: Construction and use of the secret path during client creation
  • Why exploitation is possible: Path traversal sequences in the tenant value can cause the resolved path to escape the intended tenant directory

Why this happens

The application incorporates a caller-supplied tenant identifier into a filesystem path without ensuring that the resolved path remains within the designated tenant directory. This is a path traversal weakness mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The underlying insecure pattern is treating an identifier as a safe path component without validation and path confinement.

Potential impact

  • An attacker may access credentials belonging to another tenant.
  • Exposed secrets could include OAuth client IDs and client secrets.
  • Compromised credentials could be used to access services or data available to the affected tenant.
  • Cross-tenant access could undermine confidentiality boundaries between tenants.

General mitigation guidance

Defensive patterns focus on treating tenant identifiers as untrusted input and constraining secret access to an explicit tenant boundary. Common approaches include:

  • Accepting tenant identifiers only from a strict, documented allowlist or format.
  • Resolving paths and verifying they remain beneath the intended base directory before accessing files.
  • Using secure-by-default APIs that operate relative to a trusted directory rather than concatenating arbitrary path components.
  • Limiting which secrets are mounted or accessible to each workload, and applying least-privilege filesystem permissions.
  • Avoiding reliance on caller-supplied tenant values as the sole authorization boundary.

How teams detect issues like this

  • Use static analysis to identify filesystem paths built from request, caller, or configuration values.
  • Review code that joins tenant identifiers with secret directories, especially where validation or canonical-path checks are absent.
  • Add tests and policy checks that verify resolved paths stay within approved tenant-specific directories.
  • Monitor secret access for unexpected cross-tenant reads and enforce workload-level access boundaries.
  • Automated code review tools may help flag tainted input flowing into filesystem operations.

Sources

SourceLink
github.comgithub.com/SAP/cloud-sdk-python/security/advisories/GHSA-28c8-457r-4cf6
url.sapurl.sap/sapsecuritypatchday

Frequently asked

questions

It affects secret resolution through agent_memory when a caller-controlled tenant value can influence filesystem paths and the process can access secrets for other tenants.

An attacker generally needs a way to supply the tenant value to create_client. The application or workload must also have access to the relevant mounted credentials.

Validate tenant identifiers and ensure every resolved secret path remains inside the intended tenant directory before accessing it.

Treat identifiers as untrusted, use confined filesystem access patterns, apply least-privilege permissions, and test path boundaries as part of security review.

Find out what's already
exploitable in your codebase.