Skip to content

Empty String Integer Parsing in NumberObject.new #107

Description

@JeffAllen714

I found something when using PyPDF in my flask application. When processing a malformed PDF file with a corrupted xref table, the library attempts to parse an empty string as an integer, resulting in an unhandled ValueError exception. This can potentially be exploited to cause denial of service in applications that use PyPDF4 to process user-uploaded PDF files.

I've created a write-up explaining this more in depth, including a PoC

https://github.com/JeffAllen714/PyPDF4-Integer-Parsing-Vulnerability/blob/main/PyPDF4-Integer-Parsing-Vulnerability-Writeup.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions