/

CVE-2025-68953

Severity:

HIGH RISK

(7.5)

Path Traversal in Frappe Web Requests Enables Arbitrary

CVE-2025-68953

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read on Server

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

Frappe framework versions 14.99.5 and below, and 15.0.0 through 15.80.1 contain HTTP request handlers that are vulnerable to path traversal, allowing crafted paths to escape intended directories.

Under certain configurations, an attacker can leverage these requests to read arbitrary files from the server's filesystem if the application is directly exposed and file paths are not properly sanitized.

Affected context

The vulnerability occurs in Frappe deployments where specific HTTP endpoints accept user-controlled path components and resolve them directly against the server filesystem.

It becomes relevant when:

  • The Frappe application is directly accessible over the network (e.g., not fully shielded behind a strict reverse proxy).
  • File-serving or resource-loading endpoints rely on user-supplied path segments.
  • Input normalization and directory boundary checks are incomplete or missing.

In such conditions, crafted paths containing traversal sequences (like ../) may cause the application to access files outside the intended directory scope.

Exploit preconditions

  • Attack surface: Network-exposed Frappe application endpoints that accept file or path parameters.
  • Required access: Ability to send HTTP requests to the affected Frappe instance (typically unauthenticated or low-privilege, depending on endpoint access controls).
  • Trigger point: Submission of a request where user-controlled path elements are interpreted as filesystem locations without robust normalization and boundary enforcement.
  • Why exploitation is possible: The server resolves incoming paths without consistently validating that the resulting canonical path stays within an allowed directory, enabling traversal outside the intended root.

Why this happens

This vulnerability stems from insufficient validation and sanitization of user-supplied paths before they are used for filesystem access.

Affected handlers likely:

  • Accept strings that may include sequences such as ../ or encoded equivalents.
  • Concatenate or join these values with a base directory.
  • Pass the resulting path to file APIs without canonicalization and enforcement of directory boundaries.

Conceptually, this corresponds to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where the application fails to enforce that a requested path remains within an expected root, allowing attackers to navigate the server's directory structure and access unintended files.

Potential impact

  • Exposure of configuration files that may contain database credentials or API keys.
  • Disclosure of application source code or internal business logic.
  • Access to log files that could reveal sensitive operational data or user information.
  • Disclosure of environment-specific secrets, potentially aiding in further compromise.
  • Leakage of user data or other sensitive files stored on the application server.

General mitigation guidance

Effective mitigation focuses on enforcing strict directory boundaries and treating all path input as untrusted:

  • Normalize and canonicalize requested paths before use, and verify that the resolved path is strictly within a predefined, whitelisted root directory.
  • Reject or safely handle any input containing traversal indicators (e.g., .., absolute paths, or device paths) after normalization.
  • Use high-level file access helpers that encapsulate safe path resolution rather than directly constructing filesystem paths.
  • Implement a strict allowlist of accessible resources or path patterns, rather than allowing arbitrary user-specified paths.
  • Limit the presence of sensitive files on the same host or ensure they are located outside any directories that the application can serve.
  • Apply least-privilege to the application's OS-level account so that, even if traversal occurs, accessible data is minimized.

Architectural defenses such as reverse proxies that restrict path patterns and do not forward dangerous segments can further reduce risk, but should complement, not replace, in-application validation.

How teams detect issues like this

Organizations can pursue multiple detection angles:

  • Static analysis: Configure rules to flag direct use of user-controlled strings in filesystem APIs (e.g., open/readfile/path join operations) without normalization and boundary checks.
  • Code review: Look for handlers that:
  • Accept path or filename parameters.
  • Concatenate these parameters to base directories.
  • Lack explicit checks ensuring the resulting path resides under an expected root.
  • Security testing: Use dynamic scanning or manual testing to probe for directory traversal by:
  • Injecting traversal sequences (e.g., ../) into path parameters.
  • Observing whether error messages, response bodies, or timing differences indicate access outside expected directories.
  • Runtime monitoring: Enable logging for file access failures and unusual path patterns, and alert on suspicious sequences such as repeated ../ or URL-encoded traversal in requests.

Automated SAST/DAST tools and CI-integrated policy checks can help detect similar patterns early in the development lifecycle.

Sources

SourceLink
github.comgithub.com/frappe/frappe/commit/3867fb112c3f7be1a863e40f19e9235719f784fb
github.comgithub.com/frappe/frappe/commit/959efd6a498cfaeaf7d4e0ab6cca78c36192d34d
github.comgithub.com/frappe/frappe/security/advisories/GHSA-xj39-3g4p-f46v

Frequently asked

questions

Exploitability depends on which endpoints are exposed and whether they require authentication, but in many typical web deployments, any network-accessible user who can reach the affected Frappe routes may be able to attempt path traversal.

Not necessarily. If the vulnerable endpoints are publicly accessible and do not enforce authentication, an unauthenticated attacker could exploit the issue. If access is gated, the attacker would at least need the level of privileges required to reach those routes.

The safest pattern is to treat all path input as untrusted, normalize it, and enforce that the final canonical path stays within an explicitly defined root directory. Paths that attempt to escape this directory or contain traversal constructs should be rejected outright, and file access should be mediated through helper functions that embed these checks.

Prevention relies on a combination of secure design and process: centralize file-access logic behind safe abstractions, mandate canonicalization and boundary checks for any path derived from user input, use allowlists for accessible files or directories, and enforce these practices through code review, static analysis rules, and security-focused development guidelines.

Find out what's already
exploitable in your codebase.