Intel

AIKIDO-2025-10430

pdfjs is vulnerable to Infinite Loop

Infinite Loop Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 2, 2025

47

Medium Risk

This Affects:

JSpdfjs
2.0.0 - 2.5.3
Fixed in 2.5.4
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to an infinite loop when processing a corrupted PDF file containing malformed arrays. The lexer fails to properly handle cases where the array terminator ] is missing, causing it to loop indefinitely after exceeding the buffer length without triggering an error. An attacker could exploit this vulnerability by crafting a malicious PDF to induce a denial-of-service (DoS) condition, consuming excessive CPU resources. This exploit occurs because the lexer continues searching for the terminator even after the buffer bounds have been exceeded.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

pdfjs is vulnerable to Infinite Loop in versions 2.0.0 - 2.5.3.

How to fix this

Upgrade the pdfjs library to the patch version.