Repository navigation
Conversation
lopdf < 0.42.0 parses nested PDF arrays/dictionaries with unbounded recursion, so a small crafted PDF (deeply nested array in the Catalog) overflows the stack and aborts the process (RUSTSEC-2026-0187). korvus's document loader calls Document::load directly on whatever file it's handed, including PDFs from an ingestion pipeline, so this is reachable with attacker-controlled input. The nom_parser feature was removed in newer lopdf, dropped it from the dependency declaration. Document::load/get_pages/extract_text signatures are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lopdf < 0.42.0 parses nested PDF arrays/dictionaries with unbounded recursion. A small crafted PDF with a deeply nested array in the Catalog overflows the stack and aborts the process (RUSTSEC-2026-0187, fixed in lopdf 0.42.0).
korvus/src/utils.rscallsDocument::loaddirectly on whatever file the document loader is given, so a malicious PDF fed into the ingestion pipeline can crash the process.Bumped lopdf 0.31.0 -> 0.42.0. The
nom_parserfeature no longer exists in current lopdf so I dropped it from the dependency line;Document::load,get_pages, andextract_textsignatures are unchanged, so no code changes were needed.cargo update -p lopdf --precise 0.42.0resolves cleanly.