pikepdf is vulnerable to Denial of Service (DoS)
59
Medium Risk
The pikepdf C++ extension uses unchecked nanobind casts when handling Python objects passed to Pdf.save(encryption=...) and when retaining token filters via the private Pdf._token_filter_refs list in Page.add_content_token_filter(). Passing a non-dict encryption value or clobbering _token_filter_refs with a non-list causes py::borrow to reinterpret memory as the wrong type and can segfault the interpreter instead of raising an exception. Affected applications that forward untrusted values into these APIs can crash worker processes and lose availability. The patch validates object types before borrowing and raises TypeError or resets _token_filter_refs to a safe list.
You are affected if you are using a version that falls within the vulnerable range.
pikepdf is vulnerable to Denial of Service (DoS) in versions 10.6.0 - 10.7.1.
Upgrade the pikepdf library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant