Skip to content
Medium 6.8

SSRF (Server-Side Request Forgery) in @pdfme/common

CVE-2026-82866 First seen on SecPulse

Summary

SSRF in @pdfme/common (CVE-2026-82866). Confidential information can be exposed externally.

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-82866 has been found in @pdfme/common.
Confidential information can be exposed externally. CVSS score: 6.8/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "@pdfme/common CVE-2026-82866" on the vendor's site.

CVE-2026-82866 (@pdfme/common) — CWE-918 / CVSS v3 6.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

SSRF (CWE-918) exists in @pdfme/common.

Affected scope

Check the vendor advisory for the affected versions of @pdfme/common.

Severity

Severity: Medium (CVSS 6.8/10). Confidential information can be exposed externally.

How to fix

Update to the patched release per vendor advisory.

Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@pdfme/common' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r '@pdfme/common' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で @pdfme/common を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
npm@pdfme/common
< 5.5.10→ 5.5.10
Original description The description as published by the source.

Summary

The getB64BasePdf function in @pdfme/common fetches arbitrary URLs via fetch() without any validation when basePdf is a non-data-URI string and window is defined. An attacker who can control the basePdf field of a template (e.g., through a web application that accepts user-supplied templates) can force the server or client to make requests to arbitrary internal or external endpoints, enabling Server-Side Request Forgery (SSRF) in SSR contexts or blind request forgery in browser contexts.

Details

The vulnerability exists in packages/common/src/helper.ts:130-141. When getB64BasePdf receives a string that does not start with data:application/pdf;, and window is defined, it passes the string directly to fetch():

// packages/common/src/helper.ts:130-141
export const getB64BasePdf = async (
  customPdf: ArrayBuffer | Uint8Array | string,
): Promise => {
  if (
    typeof customPdf === 'string' &&
    !customPdf.startsWith('data:application/pdf;') &&
    typeof window !== 'undefined'
  ) {
    const response = await fetch(customPdf);  // <-- No URL validation
    const blob = await response.blob();
    return blob2Base64Pdf(blob);
  }
  // ...
};

The Zod schema for basePdf in packages/common/src/schema.ts:133-135 accepts any string:

export const CustomPdf = z.union([z.string(), ArrayBufferSchema, Uint8ArraySchema]);
export const BasePdf = z.union([CustomPdf, BlankPdf]);

The checkGenerateProps functi…

Source: NIST National Vulnerability Database NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details