Uncontrolled Recursion Affecting lopdf package, versions <0.42.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-LOPDF-17660652
  • published27 Jun 2026
  • disclosed21 Jun 2026
  • creditUnknown

Introduced: 21 Jun 2026

New CVE NOT AVAILABLE CWE-674  (opens in a new tab)

How to fix?

Upgrade lopdf to version 0.42.0 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion through the load_mem function and related entry points when parsing deeply nested PDF arrays and dictionaries without enforcing a maximum recursion depth. An attacker can cause the process to exhaust the call stack and abort, resulting in a crash, by supplying a specially crafted PDF file with excessive nesting.

CVSS Base Scores

version 4.0
version 3.1