{"id":"GHSA-6fj4-rcr3-r7rr","revision":null,"records":[{"revision":"eab26f5dd4d04a2fa12669ac1f23c3f0","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-6fj4-rcr3-r7rr","aliases":["RUSTSEC-2026-0187"],"title":"lopdf has a stack overflow via deeply nested PDF objects","description":"`lopdf::Document::load_mem` (and the other `load*` entry points) parses nested PDF arrays and dictionaries with unbounded recursion. A small crafted PDF whose Catalog contains a deeply nested array (`/X [[[ … ]]]`, on the order of 10,000 levels) exhausts the call stack and aborts the process with `SIGABRT`.\n\nBecause this is a stack-overflow abort rather than a `panic!`, it cannot be caught with `catch_unwind`: any service that parses untrusted PDF input with lopdf can be crashed by a ~21 KB file, resulting in a denial of service.\n\nConfirmed on lopdf 0.41.0 and earlier; fixed in 0.42.0. Default configuration, no features changed.\n\n## Proof of concept\n\n```rust\nfn main() {\n    let bytes = std::fs::read(\"poc.pdf\").unwrap(); // ~10,380-deep nested array in the Catalog\n    let _ = lopdf::Document::load_mem(&bytes);     // stack overflow -> SIGABRT\n}\n```\n\nAn equivalent PoC is a minimal PDF whose Catalog `/X` value is `\"[\" * 10380 + \"]\" * 10380`.\n\n## Suggested fix\n\nEnforce a maximum object-nesting depth in the parser and return an `Err` instead of recursing without bound.","state":0,"publishedAt":"2026-10-16T19:55:39+00:00","modifiedAt":"2026-10-17T15:26:01.3056764+00:00","affected":[{"ecosystem":"crates.io","name":"lopdf","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.42.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/J-F-Liu/lopdf/issues/502","https://github.com/J-F-Liu/lopdf/pull/503","https://github.com/J-F-Liu/lopdf/commit/c755394ad7dd651ccfe77c618f90ab779da1dfd9","https://github.com/J-F-Liu/lopdf","https://rustsec.org/advisories/RUSTSEC-2026-0187.html"],"sourceUrl":"https://github.com/advisories/GHSA-6fj4-rcr3-r7rr","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6fj4-rcr3-r7rr","identifiers":["GHSA-6fj4-rcr3-r7rr","RUSTSEC-2026-0187"]},"retained":false,"historicalAffected":[]},{"revision":"e8687f70d08b472f8c971644407581bb","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0187","aliases":["GHSA-6fj4-rcr3-r7rr"],"title":"Stack overflow in lopdf via deeply nested PDF objects","description":"`lopdf::Document::load_mem` (and the other `load*` entry points) parses nested PDF arrays and dictionaries with unbounded recursion. A small crafted PDF whose Catalog contains a deeply nested array (`/X [[[ … ]]]`, on the order of 10,000 levels) exhausts the call stack and aborts the process with `SIGABRT`.\n\nBecause this is a stack-overflow abort rather than a `panic!`, it cannot be caught with `catch_unwind`: any service that parses untrusted PDF input with lopdf can be crashed by a ~21 KB file, resulting in a denial of service.\n\nConfirmed on lopdf 0.41.0 and earlier; fixed in 0.42.0. Default configuration, no features changed.\n\n## Proof of concept\n\n```rust\nfn main() {\n    let bytes = std::fs::read(\"poc.pdf\").unwrap(); // ~10,380-deep nested array in the Catalog\n    let _ = lopdf::Document::load_mem(&bytes);     // stack overflow -> SIGABRT\n}\n```\n\nAn equivalent PoC is a minimal PDF whose Catalog `/X` value is `\"[\" * 10380 + \"]\" * 10380`.\n\n## Suggested fix\n\nEnforce a maximum object-nesting depth in the parser and return an `Err` instead of recursing without bound.","state":0,"publishedAt":"2026-06-21T12:00:00+00:00","modifiedAt":"2026-10-17T15:15:02.5828976+00:00","affected":[{"ecosystem":"crates.io","name":"lopdf","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.42.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null}],"references":["https://crates.io/crates/lopdf","https://rustsec.org/advisories/RUSTSEC-2026-0187.html","https://github.com/J-F-Liu/lopdf/issues/502","https://github.com/J-F-Liu/lopdf/pull/503","https://github.com/J-F-Liu/lopdf/commit/c755394"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0187","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0187","identifiers":["RUSTSEC-2026-0187","GHSA-6fj4-rcr3-r7rr"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-09T07:04:24.9567057+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-09T07:04:24.9567057+00:00","lastSuccessAt":"2026-11-09T07:04:25.1719597+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:25.1719634+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-24e6fde7b744113daefb8f6135035fb8a5c69c9617c9c0d40574a0376532ffd3-bac7baae6881807b2b4a9dce5cf5dd63af98be3e5c79f031b11fd288ebb8cee0","complete":true,"records":421301,"lastAttemptAt":"2026-11-09T07:02:23.0094052+00:00","lastSuccessAt":"2026-11-09T07:02:22.9878009+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:02:23.0094052+00:00","snapshotPublishedAt":"2026-11-09T06:27:21+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d2e3823747a845d48be4a8b64d8875b5","complete":false,"records":13654,"lastAttemptAt":"2026-11-09T07:16:41.1642648+00:00","lastSuccessAt":"2026-11-09T07:16:41.156+00:00","error":"14 identifier lookups failed; latest failures include HTTP 403. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-09T07:16:41.156+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13677,"expectedIdentifiers":13706,"failedIdentifiers":14},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-09T07:04:24.9567057+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-09T07:04:24.9567057+00:00","lastSuccessAt":"2026-11-09T07:04:25.1726767+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:25.1726768+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-156d67f0b09643159ff4bd684ee896db","complete":true,"records":13666,"lastAttemptAt":"2026-11-09T07:04:26.2116374+00:00","lastSuccessAt":"2026-11-09T07:04:26.209+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:26.209+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-09T07:04:24.7370556+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:24.7370556+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-09T07:02:23.2085789+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:02:23.2085789+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f6d341f4320a5a0c059c28102ee651c3dd06abc87b84d2bafa4e2a823ec07d35","complete":true,"records":3056,"lastAttemptAt":"2026-11-09T07:04:24.9218065+00:00","lastSuccessAt":"2026-11-09T05:02:23.1539412+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:24.9218065+00:00","snapshotPublishedAt":"2026-11-09T04:47:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-32fcf2a839d0d91a36b31c98096d6b8a1a8cc523d64745f8a939e306130e49f2","complete":true,"records":231296,"lastAttemptAt":"2026-11-09T07:04:24.6113442+00:00","lastSuccessAt":"2026-11-09T07:04:23.2641171+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:24.6113442+00:00","snapshotPublishedAt":"2026-11-09T06:48:11+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}