/

CVE-2026-75482

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in SWE-agent Trajectory Inspector

CVE-2026-75482

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized 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

SWE-agent's trajectory inspector contains a path traversal vulnerability that can allow unauthenticated clients to read files outside the intended trajectory directory. The issue becomes risky when the HTTP server is network-reachable and exposed files contain trajectory-shaped JSON with repository data, command output, or secrets.

Affected context

The vulnerability occurs in the trajectory inspector's HTTP /trajectory/ handler when request paths are joined with the configured trajectory directory without reliably rejecting parent-directory references. Risk is increased when the server binds to all interfaces, permits wildcard CORS requests, and is operated without authentication. Disclosure through the affected read path is constrained to files that can be parsed as trajectory-compatible JSON.

Exploit preconditions

  • Attack surface: HTTP requests to the trajectory inspector's /trajectory/

endpoint

  • Required access: Network reachability; authentication is not required - Trigger point: A request path containing parent-directory traversal

references

  • Enabling condition: The handler joins attacker-controlled path components

with the trajectory directory without complete canonicalization and

containment checks

  • Exposure factor: Binding to 0.0.0.0 and wildcard CORS may make requests

possible from broader network locations or malicious web pages

  • Disclosure constraint: The targeted file must be accepted by the

trajectory JSON parsing path

Why this happens

The underlying bug is insufficient path validation before filesystem access. The handler treats request-derived path components as safe after incomplete sanitization, allowing parent-directory references to escape the intended directory when paths are joined. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, because the application does not enforce that the resolved target remains within its approved filesystem root.

Potential impact

  • An unauthenticated attacker may read trajectory-compatible JSON files outside the intended directory.
  • Disclosed files could contain repository contents or command output.
  • Secrets, API keys, or other sensitive values may be exposed.
  • A malicious web page could potentially initiate cross-origin requests where browser and CORS conditions permit.
  • The incident could enable follow-on compromise of connected services if disclosed credentials remain valid.

General mitigation guidance

Mitigation generally focuses on enforcing a strict filesystem containment boundary and reducing unnecessary network exposure. Secure-by-default patterns include resolving requested paths canonically and accepting them only when they remain beneath the configured root, rejecting traversal encodings before filesystem operations, and serving only an explicit allowlist of files or identifiers rather than arbitrary path fragments. Authentication and narrowly scoped CORS policies can reduce unauthorized access, while binding administrative tools to a restricted interface, applying least-privilege filesystem permissions, and excluding secrets from trajectory data reduce impact. Responses should also avoid exposing more content than the endpoint requires.

How teams detect issues like this

Detection can include static analysis for filesystem joins that combine request parameters with directory roots without canonical containment checks, along with code review for direct use of URL paths in file reads. Dynamic testing can exercise encoded and repeated parent-directory references, alternate separators, and normalization edge cases while verifying that resolved paths cannot escape the approved root. Runtime monitoring may alert on traversal-like requests, unexpected access to sensitive directories, broad CORS behavior, and unauthenticated exposure of administrative HTTP services. Automated security review tools and policy checks can help enforce approved path-handling and network-exposure patterns.

Sources

SourceLink
github.comgithub.com/SWE-agent/SWE-agent
github.comgithub.com/SWE-agent/SWE-agent/blob/main/sweagent/inspector/server.py
github.comgithub.com/SWE-agent/SWE-agent/issues/1472
vulncheck.comvulncheck.com/advisories/swe-agent-trajectory-inspector-path-traversal-file-disclosure

Frequently asked

questions

Yes, when the trajectory inspector is reachable over the network. The

affected endpoint does not require authentication, although network

controls may limit who can reach it.

No. A network client only needs access to the HTTP service and a path that

reaches the vulnerable handler. The file must still satisfy the endpoint's

trajectory JSON parsing requirements.

Resolve requested paths against a fixed root, verify canonical containment

after normalization, reject traversal attempts, and prefer an allowlist of

permitted trajectory resources over arbitrary filesystem paths.

Treat URL paths as untrusted input, apply strict authentication and narrowly

scoped CORS, avoid binding internal tools broadly, test normalization edge

cases, and keep secrets out of files exposed to diagnostic services.

Find out what's already
exploitable in your codebase.