Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

chore(deps): bump lopdf to 0.42.0 - #25

Open
aroh3006 wants to merge 1 commit into
postgresml:mainfrom
aroh3006:fix/lopdf-stack-overflow-dos
Open

aroh3006 wants to merge 1 commit into
postgresml:mainfrom
aroh3006:fix/lopdf-stack-overflow-dos

Conversation

@aroh3006

Copy link
Copy Markdown

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.rs calls Document::load directly 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_parser feature no longer exists in current lopdf so I dropped it from the dependency line; Document::load, get_pages, and extract_text signatures are unchanged, so no code changes were needed. cargo update -p lopdf --precise 0.42.0 resolves cleanly.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant