CVE-2025-53626: @pdfme/common Vulnerable to XSS and Prototype Pollution via Expression Evaluation

@pdfme/common Updated 02 Oct 2025

Summary

10/07/2025
Yes i
Moderate
6.1

CVE-2025-53626: @pdfme/common vulnerable to to XSS and Prototype Pollution through its expression evaluation. Affects @pdfme/common versions >= 5.2.0, < 5.4.1. Fixed in 5.4.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @pdfme/common package is a library used for generating PDF documents in JavaScript applications. It provides features for creating and manipulating PDF files, including support for templates and dynamic content. However, versions 5.2.0 to 5.4.0 contain critical vulnerabilities that allow attackers to exploit the expression evaluation feature, leading to potential security risks.

Vulnerability Detail

The vulnerability arises from the expression evaluator's sandbox, which can be bypassed to execute arbitrary JavaScript code. Attackers can leverage methods like Object.getOwnPropertyDescriptor to gain access to the Function constructor, allowing them to execute malicious scripts. This can lead to Cross-Site Scripting (XSS) attacks, where attackers can steal sensitive information or manipulate application behavior. Additionally, the evaluator permits prototype pollution through access to prototype accessor methods, enabling attackers to modify the prototype chain and impact the application’s functionality.

How To Fix

Minimum fixed version

5.4.1

This is the first release that contains the fix.

npm install @pdfme/common@5.4.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the expression evaluation feature in versions 5.2.0 to 5.4.0 until you can update to the patched version. If you must use it, ensure that user input is sanitized and validated to mitigate potential risks.

Conclusion

The @pdfme/common package has a critical vulnerability that can lead to XSS and prototype pollution. It is essential to update to version 5.4.1 or later to mitigate these risks. Users should also consider using tools like Vulert to monitor for vulnerabilities in their applications.

See every vulnerability recorded for @pdfme/common →

Share this vulnerability

FAQ

CVE-2025-53626 is a vulnerability in the @pdfme/common package that allows for XSS and prototype pollution through its expression evaluation feature.

Versions 5.2.0 to 5.4.0 of the @pdfme/common package are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without requiring any signup.

The vulnerability can lead to arbitrary JavaScript execution, allowing attackers to steal sensitive information, modify application behavior, and perform actions on behalf of users.

If you cannot update the package, avoid using the expression evaluation feature and ensure that any user inputs are properly sanitized to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for @pdfme/common.

How To Fix

Minimum fixed version

5.4.1

This is the first release that contains the fix.

npm install @pdfme/common@5.4.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback