/

CVE-2026-103591

Severity:

HIGH RISK

(7.5)

Arbitrary File Read (CWE-73) in DeepWiki-Open GET API

CVE-2026-103591

Deferred

Vulnerability type

Category:

External Control of File Name or Path

CWE:

CWE-73

Impact:

Unauthorized Arbitrary File Read

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

DeepWiki-Open contains an unauthenticated arbitrary file read vulnerability in the GET /codemap/file endpoint. An attacker may bypass path containment checks by supplying a non-URL value through repo_url, allowing access to files readable by the API process.

Affected context

The issue occurs in DeepWiki-Open deployments exposing the /codemap/file endpoint when the endpoint accepts attacker-controlled repo_url values and applies inconsistent validation based on whether the value resembles a URL. If path containment checks are bypassed, the API process may access files outside the intended repository or codemap directory.

Exploit preconditions

  • Attack surface: The unauthenticated HTTP GET /codemap/file endpoint
  • Required access: Network access to the exposed API; authentication is not required
  • Trigger point: Processing of the repo_url parameter during file lookup
  • Why exploitation is possible: Non-URL input can avoid expected repository-path validation, allowing absolute paths to reach file-access logic

Why this happens

The underlying bug is improper validation and normalization of an externally controlled file location. The endpoint applies path containment protections conditionally, so input that does not match the expected URL form can bypass those protections. This maps to CWE-73: External Control of File Name or Path, where attacker-controlled data influences filesystem access without consistently enforcing an approved directory boundary.

Potential impact

  • Sensitive application, configuration, or source files may be disclosed
  • Credentials, tokens, or private keys stored on the host may be exposed
  • Internal deployment details may be revealed
  • Retrieved information could support further compromise of the API host or connected systems

General mitigation guidance

Mitigation generally focuses on making file access explicitly allowlisted and independent of attacker-controlled path semantics.

Common defensive patterns include:

  • Resolve and canonicalize paths before access, then enforce a single approved root directory
  • Reject absolute paths, traversal components, and non-canonical representations by default
  • Validate repository identifiers against trusted server-side metadata rather than accepting arbitrary paths
  • Avoid conditional validation based solely on URL or input formatting
  • Run the API with least-privilege filesystem permissions and minimize access to sensitive locations
  • Apply authentication and authorization controls to file-serving endpoints where appropriate

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying filesystem APIs that consume request parameters
  • Code review checks for missing canonicalization and inconsistent path-boundary enforcement
  • Tests covering absolute paths, traversal sequences, URL-like and non-URL inputs, and symlink behavior
  • Web-application monitoring for unusual file-read requests and repeated path-validation failures
  • Policy enforcement requiring approved-root checks before filesystem access

Automated security review tools may help identify externally controlled path flows, but findings should be verified against deployment-specific filesystem permissions.

Sources

SourceLink
github.comgithub.com/AsyncFuncAI/deepwiki-open
github.comgithub.com/AsyncFuncAI/deepwiki-open/blob/d92819a9c9f3b99416e3580ff235fc9d3adf8b89/api/repository.py
github.comgithub.com/AsyncFuncAI/deepwiki-open/blob/d92819a9c9f3b99416e3580ff235fc9d3adf8b89/api/routers/codemap.py
github.comgithub.com/AsyncFuncAI/deepwiki-open/blob/d92819a9c9f3b99416e3580ff235fc9d3adf8b89/api/services/codemap.py
github.comgithub.com/AsyncFuncAI/deepwiki-open/issues/590
vulncheck.comvulncheck.com/advisories/deepwiki-open-through-commit-d92819a-unauthenticated-arbitrary-file-read-via-codemap-file

Frequently asked

questions

Yes. An attacker generally needs only network access to an exposed DeepWiki-Open API endpoint because the affected request does not require authentication.

Authentication is not required according to the vulnerability description, but the attacker must be able to reach the GET /codemap/file endpoint.

Resolve requested paths against a trusted, approved root and reject any result that falls outside that root. Repository selection should also be based on trusted identifiers rather than arbitrary client-supplied paths.

Centralize path validation, test all input representations including absolute and traversal-oriented values, enforce least-privilege filesystem access, and monitor file-serving endpoints for anomalous requests.

Find out what's already
exploitable in your codebase.