CVE-2026-82866 Overview
CVE-2026-82866 is a Server-Side Request Forgery (SSRF) vulnerability in the @pdfme/common npm package affecting versions prior to 5.5.10. The flaw resides in the getB64BasePdf function, which fetches arbitrary URLs without validation when the basePdf value is attacker-controlled. Attackers who influence the basePdf template field can coerce servers or clients to issue requests toward internal endpoints. This enables cloud metadata exfiltration, internal network reconnaissance, and blind request forgery attacks against services reachable from the vulnerable host. The vulnerability is categorized under CWE-918.
Critical Impact
Unauthenticated attackers can pivot through vulnerable servers to reach internal-only services, including cloud instance metadata endpoints that leak temporary credentials.
Affected Products
- @pdfme/common versions prior to 5.5.10
- Applications embedding the pdfme library that accept user-supplied basePdf templates
- Server-side rendering environments processing untrusted pdfme templates
Discovery Timeline
- 2026-08-31 - CVE-2026-82866 published to NVD
- 2026-09-02 - Last updated in NVD database
Technical Details for CVE-2026-82866
Vulnerability Analysis
The @pdfme/common package provides shared utilities for the pdfme PDF generation ecosystem. The getB64BasePdf helper is responsible for resolving the basePdf field of a template into base64-encoded PDF content. When the field contains a string that appears to be a URL, the function performs an HTTP fetch to retrieve the referenced resource.
The function does not validate the URL scheme, host, or destination against an allowlist. Any user who can influence the template payload can specify arbitrary internal or external URLs. The fetch executes with the network privileges of the process running the pdfme code, which frequently has access to internal services unavailable from the public internet.
The attack succeeds regardless of authentication on the pdfme-consuming application because the fetch is triggered as part of normal template processing.
Root Cause
The root cause is missing input validation on a URL parameter that flows into a network request. Neither the scheme (permitting http, https, file, or gopher variants depending on the runtime) nor the target host is filtered. There is no allowlist, no DNS re-resolution guard, and no block for RFC1918 or link-local ranges such as 169.254.169.254, the standard cloud metadata address.
Attack Vector
An attacker submits a pdfme template where the basePdf field is set to a URL under their choosing. When the vulnerable server invokes getB64BasePdf, the process issues an outbound request to that URL and may return response contents, timing signals, or side effects to the attacker. Typical targets include the AWS, GCP, and Azure instance metadata services, internal admin APIs, and unauthenticated internal databases.
Because exploitation requires only that the application accept an attacker-influenced template, the vector is remote and network-based. Full technical details are documented in the GitHub Security Advisory GHSA-pgx6-7jcq-2qff and the VulnCheck SSRF Advisory.
Detection Methods for CVE-2026-82866
Indicators of Compromise
- Outbound HTTP requests from application servers to 169.254.169.254, metadata.google.internal, or 100.100.100.200 originating from Node.js processes hosting pdfme
- Requests from pdfme processes to RFC1918 addresses that are not part of normal application dependencies
- Anomalous User-Agent strings matching Node.js fetch defaults in traffic destined for internal services
Detection Strategies
- Review application logs for pdfme template submissions containing basePdf values that begin with http://, https://, or file:// schemes pointing to non-approved hosts
- Deploy egress traffic monitoring to alert on any request from application tiers to cloud metadata IPs
- Inspect dependency manifests (package.json, package-lock.json) for @pdfme/common versions below 5.5.10
Monitoring Recommendations
- Enable DNS query logging on application hosts and alert on lookups for metadata.* hostnames
- Correlate outbound connection telemetry with process attribution to identify pdfme-initiated requests to internal ranges
- Track error responses and unusual latency patterns in pdfme rendering endpoints, which can indicate blind SSRF probing
How to Mitigate CVE-2026-82866
Immediate Actions Required
- Upgrade @pdfme/common to version 5.5.10 or later across all projects, including transitive dependencies
- Audit application code paths that accept user-supplied basePdf values and add server-side validation
- Apply Instance Metadata Service v2 (IMDSv2) on AWS and equivalent hardened metadata configurations on other clouds to raise the bar for credential theft via SSRF
Patch Information
The maintainers addressed the flaw in @pdfme/common version 5.5.10. Consumers should update via npm install @pdfme/common@^5.5.10 or the equivalent yarn or pnpm command. Verify the resolved version in the lockfile after upgrade. Refer to the GitHub Security Advisory for the full changelog.
Workarounds
- Reject or strip basePdf values that are URLs, accepting only base64-encoded PDF content from clients
- Route outbound HTTP traffic from application servers through an egress proxy that enforces an allowlist and blocks RFC1918, loopback, and link-local destinations
- Run pdfme rendering in a network-isolated container with no route to internal services or metadata endpoints
# Configuration example
npm install @pdfme/common@^5.5.10
npm ls @pdfme/common
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

