/

CVE-2026-119145

Severity:

CRITICAL RISK

(9.9)

Path Traversal (CWE-22) in Frappe File Upload Handler

CVE-2026-119145

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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 contains a path traversal vulnerability in file-upload handling that may allow authenticated attackers to write crafted files outside the intended storage directory. If the uploaded content reaches an executable server-controlled location, this could result in remote code execution and server compromise.

Frappe contains a path traversal vulnerability in file-upload handling that may allow authenticated attackers to write crafted files outside the intended storage directory. If the uploaded content reaches an executable server-controlled location, this could result in remote code execution and server compromise.

Affected context

The issue occurs in Frappe deployments where authenticated users can upload files and the upload workflow does not adequately validate or constrain the destination path. Risk increases when uploaded content can be written to locations that the application server executes, loads, or otherwise processes as trusted code.

The issue occurs in Frappe deployments where authenticated users can upload files and the upload workflow does not adequately validate or constrain the destination path. Risk increases when uploaded content can be written to locations that the application server executes, loads, or otherwise processes as trusted code.

Exploit preconditions

  • Attack surface: Authenticated file-upload functionality
  • Required access: Valid credentials with permission to submit or upload files
  • Trigger point: File handling that constructs or accepts a destination path before writing the upload
  • Why exploitation is possible: Insufficient canonicalization and directory-boundary validation may allow a crafted path to escape the intended upload directory
  • Additional condition: Remote code execution generally requires the written file to reach an executable or server-interpreted location
  • Attack surface: Authenticated file-upload functionality
  • Required access: Valid credentials with permission to submit or upload files
  • Trigger point: File handling that constructs or accepts a destination path before writing the upload
  • Why exploitation is possible: Insufficient canonicalization and directory-boundary validation may allow a crafted path to escape the intended upload directory
  • Additional condition: Remote code execution generally requires the written file to reach an executable or server-interpreted location

Why this happens

The underlying defect is a failure to enforce that upload destinations remain within an approved storage directory. When user-controlled path components influence filesystem writes without canonicalization, normalization, and boundary checks, traversal sequences can redirect output to unintended locations. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, and may become more severe when the affected server can execute or load the written content.

The underlying defect is a failure to enforce that upload destinations remain within an approved storage directory. When user-controlled path components influence filesystem writes without canonicalization, normalization, and boundary checks, traversal sequences can redirect output to unintended locations. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, and may become more severe when the affected server can execute or load the written content.

Potential impact

  • An attacker may overwrite or create files outside the intended upload directory
  • The application server could execute attacker-controlled code
  • Sensitive application data or configuration could be modified
  • Server confidentiality, integrity, and availability may be compromised
  • Compromised hosts could be used for lateral movement or further attacks
  • An attacker may overwrite or create files outside the intended upload directory
  • The application server could execute attacker-controlled code
  • Sensitive application data or configuration could be modified
  • Server confidentiality, integrity, and availability may be compromised
  • Compromised hosts could be used for lateral movement or further attacks

General mitigation guidance

Mitigation generally focuses on making upload destinations server-controlled and enforcing directory boundaries independently of user input.

Common defensive patterns include:

  • Generate storage filenames and paths rather than accepting destination paths from clients
  • Canonicalize candidate paths and verify they remain beneath an approved, fixed directory
  • Reject traversal components, absolute paths, symlink escapes, and ambiguous path encodings
  • Store uploads outside executable web or application-code directories
  • Apply restrictive permissions and least privilege to the application service account
  • Validate file type and content independently of filename extensions
  • Use isolated storage and malware scanning where appropriate
  • Preserve audit logs for upload requests, resolved paths, and filesystem failures

Mitigation generally focuses on making upload destinations server-controlled and enforcing directory boundaries independently of user input.

Common defensive patterns include:

  • Generate storage filenames and paths rather than accepting destination paths from clients
  • Canonicalize candidate paths and verify they remain beneath an approved, fixed directory
  • Reject traversal components, absolute paths, symlink escapes, and ambiguous path encodings
  • Store uploads outside executable web or application-code directories
  • Apply restrictive permissions and least privilege to the application service account
  • Validate file type and content independently of filename extensions
  • Use isolated storage and malware scanning where appropriate
  • Preserve audit logs for upload requests, resolved paths, and filesystem failures

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem writes that incorporate request parameters
  • Code review checks for missing canonicalization and directory-boundary validation
  • Tests using encoded, normalized, absolute, and symlink-based path variants
  • Runtime monitoring for uploads that resolve outside approved directories
  • File integrity monitoring on application code, configuration, and executable paths
  • Web application policies that restrict upload destinations and reject suspicious path patterns

Automated security review tools may help identify unsafe path construction, but findings should be validated against the deployment's storage and execution model.

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem writes that incorporate request parameters
  • Code review checks for missing canonicalization and directory-boundary validation
  • Tests using encoded, normalized, absolute, and symlink-based path variants
  • Runtime monitoring for uploads that resolve outside approved directories
  • File integrity monitoring on application code, configuration, and executable paths
  • Web application policies that restrict upload destinations and reject suspicious path patterns

Automated security review tools may help identify unsafe path construction, but findings should be validated against the deployment's storage and execution model.

Sources

SourceLink
github.comgithub.com/frappe/frappe/security/advisories/GHSA-9pp9-wgp9-3p3j
vulncheck.comvulncheck.com/advisories/frappe-before-15.121.0-and-16-x-before-16.34.0-path-traversal-rce-via-file-upload

Frequently asked

questions

It can be, when the Frappe instance exposes the affected upload functionality and an attacker has valid authenticated access. The practical impact depends on upload permissions and the server's filesystem and execution configuration.

The attacker generally needs an account authorized to upload files. Anonymous exploitation is not implied by the vulnerability description.

Keep upload destinations fully server-controlled, canonicalize and validate resolved paths against an approved directory, and prevent uploaded content from being executed.

Use centralized secure file-storage helpers, apply least-privilege filesystem permissions, test path handling with adversarial inputs, and monitor sensitive directories for unexpected file creation or modification.

It can be, when the Frappe instance exposes the affected upload functionality and an attacker has valid authenticated access. The practical impact depends on upload permissions and the server's filesystem and execution configuration.

The attacker generally needs an account authorized to upload files. Anonymous exploitation is not implied by the vulnerability description.

Keep upload destinations fully server-controlled, canonicalize and validate resolved paths against an approved directory, and prevent uploaded content from being executed.

Use centralized secure file-storage helpers, apply least-privilege filesystem permissions, test path handling with adversarial inputs, and monitor sensitive directories for unexpected file creation or modification.

Find out what's already
exploitable in your codebase.