Skip to content

Conversation

@crackcodecamp
Copy link
Contributor

@crackcodecamp crackcodecamp commented Nov 11, 2025

Update pypdf dependency to address vulnerabilities causing potential denial of service through infinite loops or excessive memory usage when handling malicious PDFs. The update remains fully backward compatible, with no changes to the PdfReader API.

What does this PR do?

Fixes #4120

Test Plan

Update pypdf dependency to fix CVE-2025-62707, a DoS vulnerability
allowing infinite loops when processing malicious PDFs.

- CVE-2025-62707: Infinite loop in DCTDecode inline image parsing
- CVE-2025-55197: RAM exhaustion via FlateDecode filter
- Backward compatible (PdfReader API unchanged)

Fixes llamastack#4120
@meta-cla
Copy link

meta-cla bot commented Nov 11, 2025

Hi @crackcodecamp!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@crackcodecamp crackcodecamp changed the title fix: update pypdf to >=6.1.3 to address CVE-2025-62707 fix: update pypdf to >=6.1.3 Nov 11, 2025
@meta-cla
Copy link

meta-cla bot commented Nov 11, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 11, 2025
@crackcodecamp crackcodecamp changed the title fix: update pypdf to >=6.1.3 chore(deps): update pypdf to fix DoS vulnerabilities Nov 11, 2025
@crackcodecamp
Copy link
Contributor Author

@franciscojavierarceo As approved, who can merge it? Is there additional approvals required?

@franciscojavierarceo
Copy link
Collaborator

will merge after CI passes

@crackcodecamp
Copy link
Contributor Author

crackcodecamp commented Nov 11, 2025

@franciscojavierarceo The one CI check stuck for very long time, may be need to re-run. Could you please look into it?
Thanks!

@cdoern
Copy link
Contributor

cdoern commented Nov 11, 2025

see #4119 , this should fix CI. But there are concerns of an actual deadlock in the conversations API, so this might be a bandaid fix

Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failure is unrelated and being addressed, let's move forward, thanks!

@leseb leseb merged commit 539b9c0 into llamastack:main Nov 12, 2025
75 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pypdf 5.9.0 needs to update pypdf >= 6.1.3

4 participants