/

CVE-2026-34365

Severity:

HIGH RISK

(7.6)

SSRF in InvoiceShelf Estimate PDF Generation

CVE-2026-34365

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Server-Side Request Forgery and Internal Network Exposure

Severity:

HIGH RISK

(7.6)

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

A Server-Side Request Forgery (SSRF) flaw in InvoiceShelf's Estimate PDF generation allows user-controlled HTML in the Notes field to trigger server-side HTTP requests via the Dompdf rendering engine.

When an attacker crafts markup that references external resources, the server may connect to arbitrary internal or external URLs during PDF preview or customer view, potentially exposing internal services and sensitive metadata.

Affected context

The vulnerability appears in the Estimate PDF generation workflow of InvoiceShelf, where user-provided content in the Notes field is converted to HTML and rendered by Dompdf.

In affected versions, the application permits remote resource loading from within this HTML without sanitizing or constraining the URLs, so any reachable network location that the application server can access becomes part of the potential attack surface.

The issue is reachable via both the PDF preview and customer view endpoints, independent of whether automated email attachments are configured.

Exploit preconditions

  • Attack surface: HTTP(S) endpoints that generate estimate PDFs (preview and customer view URLs).
  • Required access: Ability to create or modify an estimate whose Notes field is rendered into a PDF; this may be via authenticated user roles or compromised accounts.
  • Trigger point: Requesting the PDF generation (or preview) so that Dompdf processes the attacker-supplied HTML.
  • Why exploitation is possible: The Notes field HTML is passed unsanitised to Dompdf, which automatically fetches external resources (e.g., images, styles, or other assets) using URLs fully controlled by the attacker, without enforcing a strict allowlist or network boundary checks.

Why this happens

The underlying issue is untrusted user input being used as HTML markup that a server-side rendering component (Dompdf) interprets, including resource URLs.

Dompdf's default behavior may resolve and fetch external resources referenced by that HTML, effectively turning user-controlled content into server-side HTTP requests.

This maps to CWE-918: Server-Side Request Forgery, where an application constructs or triggers outbound requests based on attacker-controlled input without adequate validation, resulting in potential access to internal networks or services.

Conceptually, this pattern is: "User-supplied document content → HTML rendering engine → automatic network fetch of embedded resources" with no strict control over the destination.

Potential impact

  • Could allow probing of internal network services (host and port discovery) from the perspective of the InvoiceShelf server.
  • May enable interaction with internal-only HTTP endpoints, such as admin panels, internal APIs, or cloud metadata services.
  • Can facilitate exfiltration of response data via side channels (e.g., encoded in subsequent outbound requests) depending on renderer behavior.
  • Might be used as a pivot point in a larger attack chain, such as assisting in credential theft, cloud instance takeover, or exploitation of other internal vulnerabilities.
  • Can generate unexpected outbound traffic, potentially impacting availability of internal services or drawing down metered resources.

General mitigation guidance

Effective mitigation focuses on constraining how user-supplied content is processed and how outbound requests are performed:

  • Treat all user-editable HTML fields as untrusted and sanitize or transform them to a safe subset (e.g., removing or neutralizing tags/attributes that can load remote resources such as <img>, <link>, <script>, CSS url(), and similar constructs).
  • Configure the PDF/HTML rendering engine to disable or strictly limit external resource fetching, defaulting to local-only or inlined assets whenever possible.
  • Introduce allowlists for outbound HTTP destinations used by server-side components, blocking arbitrary URLs and non-essential protocols.
  • Enforce network-layer egress controls (e.g., firewall rules, cloud security groups) that prevent application servers from reaching sensitive network segments and metadata endpoints.
  • Separate rendering services into more restricted network zones, applying the principle of least privilege to what internal hosts and ports they can access.

How teams detect issues like this

Possible detection approaches include:

  • Static analysis focused on HTML-to-PDF or HTML rendering flows that consume user-controlled data and pass it to libraries known to fetch remote resources.
  • Code review checklists that explicitly flag unsanitised HTML fields used in PDF generation, email templates, or other server-side rendering paths.
  • Runtime monitoring of outbound HTTP(S) traffic from application servers for unusual destinations, such as internal IP ranges, metadata services, or non-standard ports.
  • Security tests and QA routines that attempt to embed external URLs in PDF-related fields and observe whether the server attempts to fetch those URLs.
  • Use of automated security scanning tools (DAST/IAST) that can exercise PDF generation endpoints with controlled payloads and detect SSRF-like behaviors.

Sources

SourceLink
github.comgithub.com/InvoiceShelf/InvoiceShelf/releases/tag/2.2.0
github.comgithub.com/InvoiceShelf/InvoiceShelf/security/advisories/GHSA-pc5v-8xwc-v9xq

Frequently asked

questions

Yes, if an attacker can access the estimate creation or editing interface and trigger PDF generation endpoints, they can attempt SSRF from any location that can reach the InvoiceShelf instance, subject to authentication and deployment configuration.

The attacker generally needs the ability to supply or modify the Notes field content on an estimate that will be rendered into a PDF.

In many deployments, this corresponds to valid application credentials with permission to manage estimates, or a compromised user account with those capabilities.

The most robust pattern is to prevent untrusted content from influencing server-side network behavior: sanitize or restrict HTML to a safe subset, disable external resource loading in rendering engines, and enforce strict outbound network controls so that even if a renderer processes attacker-controlled URLs, it cannot reach sensitive internal systems.

Systematically treat all user-controlled URLs and markup as untrusted, adopt architectural patterns that segregate rendering and untrusted processing into tightly firewalled components, implement egress filtering and destination allowlists, and include SSRF-specific checks in code review, threat modeling, and automated security testing for any feature that performs server-side HTTP requests.

Find out what's already
exploitable in your codebase.