CVE-2026-31017
Received Received - Intake
SSRF in ERPNext/Frappe PDF Rendering Risks Data Exposure

Publication date: 2026-04-08

Last updated on: 2026-04-14

Assigner: MITRE

Description
A Server-Side Request Forgery (SSRF) vulnerability exists in the Print Format functionality of ERPNext v16.0.1 and Frappe Framework v16.1.1, where user-supplied HTML is insufficiently sanitized before being rendered into PDF. When generating PDFs from user-controlled HTML content, the application allows the inclusion of HTML elements such as <iframe> that reference external resources. The PDF rendering engine automatically fetches these resources on the server side. An attacker can abuse this behavior to force the server to make arbitrary HTTP requests to internal services, including cloud metadata endpoints, potentially leading to sensitive information disclosure.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-08
Last Modified
2026-04-14
Generated
2026-05-07
AI Q&A
2026-04-08
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
frappe erpnext 16.0.1
frappe frappe 16.1.1
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-918 The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-31017 is a Server-Side Request Forgery (SSRF) vulnerability found in the Print Format PDF generation functionality of ERPNext v16.0.1 and the Frappe Framework v16.1.1.

The issue occurs because the application uses wkhtmltopdf, a tool that renders PDFs from user-supplied HTML content, and does not sufficiently sanitize this HTML before rendering.

Specifically, HTML elements like <iframe> and <img> that reference external resources are allowed, and wkhtmltopdf automatically fetches these resources on the server side.

An attacker can exploit this by injecting malicious URLs into these HTML tags, causing the server to make arbitrary HTTP requests to internal services, including sensitive cloud metadata endpoints.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

This vulnerability allows attackers to perform Server-Side Request Forgery (SSRF) attacks that can lead to the disclosure of sensitive information by forcing the server to access internal services, including cloud metadata endpoints.

Such unauthorized access and potential exposure of sensitive data could impact compliance with data protection regulations and standards like GDPR and HIPAA, which require safeguarding personal and sensitive information from unauthorized access or disclosure.

Therefore, exploitation of this vulnerability may result in violations of these regulations due to the risk of sensitive information leakage.


How can this vulnerability impact me? :

This vulnerability can allow an attacker to make the server perform arbitrary HTTP requests to internal services that are normally inaccessible from outside.

Such SSRF attacks can lead to sensitive information disclosure, including access to cloud metadata services like AWS or GCP metadata endpoints.

Attackers may use this to enumerate internal networks, gather confidential data, or potentially leverage this access for further attacks within the internal environment.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection of this SSRF vulnerability involves monitoring for unusual server-side HTTP requests initiated during PDF generation from user-supplied HTML content, especially requests to internal or cloud metadata endpoints.

Since the vulnerability exploits the PDF rendering engine (wkhtmltopdf) fetching external resources like those in <iframe> or <img> tags, you can detect it by inspecting logs for unexpected outbound HTTP requests from the server.

  • Check web server or application logs for HTTP requests to internal IP ranges or cloud metadata IPs (e.g., 169.254.169.254 for AWS).
  • Use network monitoring tools (e.g., tcpdump or Wireshark) to capture outbound HTTP requests from the server during PDF generation.
  • Example command to monitor outbound HTTP requests on port 80 or 443: sudo tcpdump -i eth0 'tcp dst port 80 or tcp dst port 443'
  • Search application logs for suspicious user-supplied HTML containing <iframe> or <img> tags with external URLs.

What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include restricting the server's ability to make arbitrary outbound HTTP requests during PDF generation and sanitizing user-supplied HTML content.

  • Apply input validation and sanitization to remove or restrict HTML elements like <iframe> and <img> that can reference external resources.
  • Configure network-level controls such as firewall rules to block the server from accessing internal services and cloud metadata endpoints.
  • If possible, update ERPNext and Frappe Framework to versions that address this vulnerability once patches are released.
  • Consider disabling or restricting the use of wkhtmltopdf or the PDF generation feature for untrusted user input until a fix is applied.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart