---
id: CVE-2026-31017
title: >-
  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
summary: >-
  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 genera…
severity: critical
cvss: 9.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'
cwe:
  - CWE-918
vendor: frappe
product: erpnext
affected:
  - erpnext = 16.0.1
  - frappe = 16.1.1
published: '2026-04-08'
updated: '2026-07-25'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31017'
references:
  - url: 'https://github.com/PhDg1410/CVE/tree/main/CVE-2026-31017'
    label: cve@mitre.org
tags:
  - nvd
epss: 0.00236
epssPercentile: 0.14891
ingestedAt: '2026-07-26T00:06:15.041Z'
---

## Overview

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.

## Affected

- `erpnext = 16.0.1`
- `frappe = 16.1.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
