/

CVE-2026-134370

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in Frappe File Attachments

CVE-2026-134370

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read

Severity:

HIGH RISK

(7.7)

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 has a path traversal flaw in file attachment handling that can allow an authenticated user to read server files outside the application boundary. The risk exists even for users with an ordinary role and no write permissions when they can reach the affected attachment functionality.

Affected context

The issue affects Frappe Framework before 15.120.1 and 16.x before 16.33.1. It occurs in file attachment handling, where a path may be processed without adequately restricting access to files within the intended application boundary. Exploitation requires access to the relevant authenticated functionality.

Exploit preconditions

  • Attack surface: Authenticated file attachment handling in Frappe Framework
  • Required access: An authenticated account with an ordinary role; write permissions are not required
  • Trigger point: Processing an attachment-related file path
  • Why exploitation is possible: Path handling may allow traversal beyond the intended application boundary, enabling reads of other server files

Why this happens

The underlying issue is insufficient restriction or validation of file paths used by attachment handling. If paths are not reliably confined to an approved directory, traversal can cause the application to access files outside that boundary. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • Attackers may read files outside the application boundary
  • Exposed files could contain sensitive application or system information
  • Disclosure of configuration or credential material could support further compromise
  • Confidentiality of data accessible to the server process could be reduced

General mitigation guidance

Defensive patterns focus on confining file access to explicitly approved locations and reducing trust in user-influenced paths.

  • Resolve paths against a trusted base directory and verify the result remains within that directory
  • Prefer opaque attachment identifiers over accepting filesystem paths from users
  • Apply strict allowlists for permitted files and locations
  • Run application processes with only the filesystem permissions they need
  • Avoid exposing sensitive files to the application runtime where practical

How teams detect issues like this

  • Use static analysis to identify file operations that consume user-influenced paths without containment checks
  • Review attachment code for canonicalization, base-directory enforcement, and symlink handling
  • Monitor file-access logs for unexpected reads outside approved attachment directories
  • Enforce policies that restrict application filesystem access to required locations
  • Automated code review tools may help flag path construction and validation patterns for further review

Sources

SourceLink
github.comgithub.com/frappe/frappe/security/advisories/GHSA-r8px-9662-x39c
vulncheck.comvulncheck.com/advisories/frappe-framework-before-16.33.1-authenticated-arbitrary-file-read-via-file-attachment-handling

Frequently asked

questions

An authenticated attacker may be able to read server files outside the intended application boundary, subject to the files accessible to the application process.

No. The described issue can be abused by an authenticated user with an ordinary role that lacks write permissions.

Confine resolved file paths to a trusted base directory and use identifiers or allowlisted locations rather than trusting user-influenced paths.

Apply consistent path validation at file-access boundaries, minimize runtime filesystem privileges, and review attachment-handling code for paths that can escape approved directories.

Find out what's already
exploitable in your codebase.