fix: pin lopdf to 0.42.0 to close RUSTSEC-2026-0187 - #101
Open
hisayya wants to merge 1 commit into
Open
Conversation
pdf-inspector transitively depends on lopdf. Versions <0.42.0 are vulnerable to RUSTSEC-2026-0187: a crafted PDF with a deeply nested catalog array (~21KB) causes a stack overflow and aborts the process with an uncatchable SIGABRT (CVSS 3.1 7.5, remote DoS on untrusted PDF input). pdf-inspector 1.14.2 already resolves lopdf 0.42.0, but pinning the transitive dependency explicitly guards against resolution regressions and makes the patched version constraint visible to auditors (osv-scanner, cargo-audit). Refs: https://rustsec.org/advisories/RUSTSEC-2026-0187.html
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.
Closes #100
Explicitly pin
lopdf = "0.42.0"(direct dependency with RUSTSEC-2026-0187 comment) so the patched version cannot silently regress and scanners can see it.cargo buildpasses.Summary by cubic
Pins
lopdfto 0.42.0 to remediate RUSTSEC-2026-0187 (stack overflow DoS). Previouslylopdfwas only transitive and could resolve <0.42.0; now it is a direct dependency pinned to the patched version to prevent resolution regressions and improve scanner visibility.Review notes
lopdf = "0.42.0"toCargo.tomlwith an advisory comment; updatesCargo.lock.Written for commit 2e3ee24. Summary will update on new commits.