CVE-2026-41482 Overview
CVE-2026-41482 is a path traversal and local file inclusion vulnerability in the Frappe full-stack web application framework. The flaw resides in the Chrome PDF Generator component, where secure local resource access controls fail to constrain file paths to authorized directories. An authenticated attacker with low privileges can request arbitrary local files on the server through PDF generation flows. The vulnerability is fixed in Frappe version 16.18.3 [CWE-22].
Critical Impact
Authenticated attackers can read sensitive local files outside the intended site directories, exposing configuration, credentials, and application source code processed by the Chrome PDF Generator.
Affected Products
- Frappe framework versions prior to 16.18.3
- Deployments using the built-in Chrome PDF Generator (frappe/utils/pdf_generator/page.py)
- Frappe-based applications (including ERPNext) that render PDFs via the Chromium pipeline
Discovery Timeline
- 2026-07-10 - CVE-2026-41482 published to NVD
- 2026-07-13 - Last updated in NVD database
Technical Details for CVE-2026-41482
Vulnerability Analysis
Frappe uses a headless Chromium instance to render HTML documents into PDFs. During rendering, the framework intercepts network requests through the intercept_request_for_local_resources method in frappe/utils/pdf_generator/page.py to resolve local resource references. Prior to 16.18.3, this interceptor did not enforce path boundaries against the bench sites, assets, or site public directories. An attacker supplying crafted resource URLs could reference paths that traverse outside these directories using sequences such as ../. The Chrome instance then fetched the local file and embedded its contents into the generated PDF, returning them to the requester.
Root Cause
The root cause is missing canonicalization and containment checks on local resource paths passed to the PDF generator's request interceptor. Without resolving the real path and validating that it lies within an allow-listed root, symbolic links and traversal sequences allow file access anywhere the Frappe process user can read.
Attack Vector
An authenticated user with permissions to trigger PDF generation submits a document or template containing crafted local resource references. When Chromium requests those resources, the unpatched interceptor serves any file readable by the Frappe worker, including /etc/passwd, site site_config.json files, and application secrets.
# Security patch in frappe/utils/pdf_generator/page.py (excerpt)
def intercept_request_for_local_resources(self, url_pattern="*"):
"""Starts intercepting network requests for the given target_id and URL pattern."""
import os
data = {}
bench_sites = os.path.abspath(os.path.join(frappe.utils.get_bench_path(), "sites"))
asset_path = os.path.abspath(os.path.join(bench_sites, "assets"))
site_public_root = os.path.realpath(frappe.utils.get_site_path("public"))
files_path = os.path.realpath(frappe.utils.get_site_path("public", "files"))
def on_request_paused_event(future, response):
"""Callback for when a request is paused (intercepted)."""
params = response.get("params")
Source: Frappe commit 11066591. The patch establishes absolute, canonicalized root directories that the interceptor uses to constrain subsequent local resource resolution.
Detection Methods for CVE-2026-41482
Indicators of Compromise
- PDF generation requests whose embedded resource URLs contain ../, %2e%2e%2f, or file:// schemes pointing outside the site's public directory.
- Frappe worker logs showing local resource fetches referencing paths outside sites/<site>/public or sites/assets.
- Unexpected reads of sensitive files such as site_config.json, common_site_config.json, or /etc/passwd by the Frappe process user.
Detection Strategies
- Inspect the Chromium interception layer's request logs for resolved paths that fall outside the bench sites, assets, and site public directories.
- Correlate PDF generation events with file access telemetry from the host to identify traversal attempts.
- Alert on any Frappe user account that triggers a spike in PDF generation activity referencing atypical resource URLs.
Monitoring Recommendations
- Enable verbose logging on the PDF generator worker and forward logs to a central analytics platform for path-pattern analysis.
- Monitor file integrity and read access on sensitive configuration files owned by the Frappe service account.
- Track outbound egress from the Chromium child process; local resource interception should not result in external network calls.
How to Mitigate CVE-2026-41482
Immediate Actions Required
- Upgrade Frappe to version 16.18.3 or later, which contains the fix from pull requests #38643 and #39396.
- Audit Frappe user roles and remove PDF generation privileges from accounts that do not require them.
- Review recent PDF generation activity and worker logs for evidence of traversal attempts prior to patching.
Patch Information
The fix ships in Frappe release v16.18.3. The interceptor now computes absolute paths for the bench sites, assets, site public, and files directories and enforces containment before returning any file content. Full details are published in GitHub Security Advisory GHSA-234v-jfr8-v2f8.
Workarounds
- If patching cannot be performed immediately, disable the Chrome PDF Generator and revert to the legacy wkhtmltopdf renderer where feasible.
- Restrict Frappe worker filesystem permissions using operating system controls so the process account cannot read secrets outside its site directory.
- Run the Frappe application under a containerized or chrooted environment that limits filesystem visibility to the bench directory tree.
# Upgrade Frappe to the patched release
cd /path/to/frappe-bench
bench switch-to-branch version-16 frappe --upgrade
bench update --patch
bench --site all migrate
bench restart
# Verify the installed Frappe version
bench version | grep frappe
# Expected: frappe 16.18.3 or later
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

