Skip to main content
Vulnerability Database/CVE-2026-114491

CVE-2026-114491: pdfmake Information Disclosure Flaw

CVE-2026-114491 is an information disclosure vulnerability in pdfmake versions 0.3.8 to 0.3.11 that bypasses file access restrictions through SVG images. This post covers the technical details, affected versions, and steps to secure your systems.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-114491 Overview

CVE-2026-114491 is a local file policy bypass in pdfmake, a popular JavaScript PDF generation library. Versions 0.3.8 through 0.3.11 fail to apply the setLocalAccessPolicy() restriction to images referenced inside SVG content. An attacker who supplies a document definition can add an SVG image href pointing to a local file path. The rendered PDF then embeds the restricted file contents, exposing them to the attacker. The vulnerability is tracked under [CWE-73: External Control of File Name or Path].

Critical Impact

Attackers can read local files that setLocalAccessPolicy() was intended to block, embedding their contents inside the generated PDF.

Affected Products

  • pdfmake 0.3.8
  • pdfmake versions after 0.3.8 and before 0.3.12
  • Applications generating PDFs from untrusted document definitions using vulnerable pdfmake versions

Discovery Timeline

  • 2026-10-21 - CVE-2026-114491 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-114491

Vulnerability Analysis

pdfmake exposes setLocalAccessPolicy() to constrain which local paths the renderer may read when embedding resources into a PDF. The policy is enforced in the standard image pipeline through validateLocalFile. SVG rendering follows a different path handled by the SVGtoPDF integration. In vulnerable releases, SVG image callbacks did not route through validateLocalFile, so references embedded inside SVG markup bypassed the configured policy.

An attacker who controls a pdfmake document definition can therefore include an SVG element whose nested <image href="..."> points to a server-side file. The renderer resolves the path and embeds the file contents into the output PDF, which the attacker later retrieves.

Root Cause

The Renderer.js SVG handler passed options to SVGtoPDF without supplying an imageCallback that enforced the local access policy. See the vulnerable code in Renderer.js at tag 0.3.11. Because the callback was absent, nested image URIs reached the file resolver directly, skipping the validation applied to top-level images.

Attack Vector

Exploitation requires only that an application accept attacker-controlled document definitions and render them with a vulnerable pdfmake version. No authentication or user interaction is required on the rendering host. The attacker crafts an SVG payload referencing a sensitive local path, submits it to the PDF generation endpoint, and reads the file contents from the returned PDF.

javascript
// Security patch in src/Renderer.js
// Fixes setLocalAccessPolicy bypass for local images embedded in SVG

			return fontFile;
		};
+		options.imageCallback = link => {
+			let src = link.replace(/\s+/g, '');
+			this.pdfDocument.validateLocalFile(src);
+
+			return src;
+		};

		SVGtoPDF(this.pdfDocument, svg.svg, svg.x, svg.y, options);

Source: pdfmake commit 4ad4cbf. The patch adds an imageCallback that calls validateLocalFile(src) for every image referenced inside SVG content, enforcing the local access policy on the SVG rendering path.

Detection Methods for CVE-2026-114491

Indicators of Compromise

  • Document definitions submitted to PDF endpoints containing <svg> elements with nested <image> tags referencing local filesystem paths such as /etc/passwd, /proc/self/environ, or application configuration files.
  • Generated PDFs containing embedded image streams that decode to text content from sensitive server files.
  • pdfmake dependency pinned to a version between 0.3.8 and 0.3.11 in package.json or package-lock.json.

Detection Strategies

  • Inspect server-side logs for POST payloads containing SVG href attributes pointing to file://, absolute paths, or path traversal sequences (../).
  • Review PDF outputs produced by backend services for unexpected embedded image objects whose dimensions and formats do not match a valid image.
  • Audit application dependencies for pdfmake versions in the vulnerable range using Software Composition Analysis tooling.

Monitoring Recommendations

  • Monitor file-read activity by the Node.js process rendering PDFs for access to paths outside the application's expected working directory.
  • Alert on repeated PDF generation requests from a single source containing SVG payloads, which may indicate enumeration of local files.
  • Track outbound responses carrying PDFs with abnormally large or anomalous image streams.

How to Mitigate CVE-2026-114491

Immediate Actions Required

  • Upgrade pdfmake to version 0.3.12 or later across all services that render PDFs from user-supplied document definitions.
  • Audit application code that calls setLocalAccessPolicy() and confirm the renderer runs with the lowest filesystem privileges necessary.
  • Treat all document definitions from untrusted sources as hostile input and validate SVG content before rendering.

Patch Information

The fix is included in pdfmake 0.3.12. The patch adds an imageCallback that invokes validateLocalFile(src) for every image embedded inside SVG content, closing the policy bypass. Additional context is available in the VulnCheck Security Advisory.

Workarounds

  • Strip or reject <image> elements inside SVG content submitted by users before passing document definitions to pdfmake.
  • Run the PDF rendering service in a sandbox or container with no read access to sensitive files or secrets.
  • Disallow absolute paths and file:// URIs anywhere in document definitions through pre-render validation.
bash
# Upgrade pdfmake to the patched release
npm install pdfmake@0.3.12 --save

# Verify installed version
npm ls pdfmake

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.