{"id":"RUSTSEC-2026-0317","revision":null,"records":[{"revision":"7629a16bbb5f44f6b1accc030c434d61","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0317","aliases":["GHSA-w5x2-6474-pqp4"],"title":"A 512-byte workbook can provoke a multi-gigabyte allocation and abort the process","description":"Affected versions passed caller-supplied bytes to `calamine`'s `Xlsx::new` without first checking\nthat they were a ZIP archive. `Xlsx::new` tests for password protection on its first line, which\nparses the input as an OLE/CFB container, and a sector-count field read from the file's own header\nreaches `Vec::with_capacity` without being checked against the file's actual length. A 512-byte input\ncan therefore request several gigabytes; 9,261,285,372 bytes was measured.\n\n**The oversized allocation is always attempted. Whether it aborts depends on what the allocator can\nsatisfy.** On a large host with overcommit the reservation is granted untouched and the call returns\nan ordinary \"not an xlsx file\" error, which looks like a malformed file being correctly rejected.\nUnder a memory limit the same bytes give `memory allocation of N bytes failed` and the process\naborts, which is not a `Result` a caller can handle. Containers with a memory limit, small hosts and\nCI runners are where this lands, so testing on a development machine can wrongly suggest the crate is\nunaffected.\n\nEvery entry point reaches it, not only `compare_bytes`: the path- and reader-based APIs funnel through\nthe same internal open. Neither `Limits::default()` nor `Limits::hardened()` prevents it, because\n`max_input_bytes` bounds the length of the input while the allocation's size comes from a field\ninside it.\n\nFixed in 3.2.0, which declines input that does not begin with the ZIP magic before the parser sees\nit, removing the path rather than bounding it. Callers who cannot upgrade can apply the same check\nbefore calling this crate.\n\nThe underlying defect is in `calamine`, reported there independently as\n[tafia/calamine#714](https://github.com/tafia/calamine/issues/714) and unfixed at the time of\nwriting. It is reachable from any crate that opens untrusted bytes with `Xlsx::new`.","state":0,"publishedAt":"2026-09-29T12:00:00+00:00","modifiedAt":"2026-10-01T07:45:02.7134094+00:00","affected":[{"ecosystem":"crates.io","name":"sheets-diff","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"3.2.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":null,"severity":null}],"references":["https://crates.io/crates/sheets-diff","https://rustsec.org/advisories/RUSTSEC-2026-0317.html","https://github.com/forskscope/sheets-diff-rs/commit/fb70d62c88ca906284703c8071e51951c6ab43e2","https://github.com/forskscope/sheets-diff-rs/blob/3.2.0/CHANGELOG.md#320---2026-09-29","https://github.com/tafia/calamine/issues/714"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0317","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0317","identifiers":["RUSTSEC-2026-0317","GHSA-w5x2-6474-pqp4"]},"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-12T01:56:45.7331196+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-12T01:56:45.7331196+00:00","lastSuccessAt":"2026-11-12T01:56:45.8811913+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.881192+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-64752486c567b55b31fb0d7225f5222bcd0019564ac0ac5f0649e242c7b19299-3c214c6a32247ab2d1d3b316a538911dff65582c6da8e67b65c52a6524920b32","complete":true,"records":424535,"lastAttemptAt":"2026-11-12T01:56:45.0952496+00:00","lastSuccessAt":"2026-11-12T01:56:45.0811877+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.0952496+00:00","snapshotPublishedAt":"2026-11-12T01:20:15+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-77d04c708e8c488382ddf9a8fab0dc25","complete":false,"records":13760,"lastAttemptAt":"2026-11-12T02:00:23.1451938+00:00","lastSuccessAt":"2026-11-12T02:00:23.2002191+00:00","error":null,"lastVerifiedAt":"2026-11-12T02:00:23.2002191+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"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-12T01:56:45.7331196+00:00","complete":true,"records":1097,"lastAttemptAt":"2026-11-12T01:56:45.7331196+00:00","lastSuccessAt":"2026-11-12T01:56:45.8819472+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.8819473+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-94eaf194888848508d3f9f54dac1b6ce","complete":true,"records":13760,"lastAttemptAt":"2026-11-12T01:57:11.1206168+00:00","lastSuccessAt":"2026-11-12T01:57:11.117+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:57:11.117+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13813,"expectedIdentifiers":13813,"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-3562b6c78fd1bd0f0b55daf66a0926ae24f65e462df7f6d928caad458fc696bf","complete":true,"records":9947,"lastAttemptAt":"2026-11-12T01:56:45.5143298+00:00","lastSuccessAt":"2026-11-11T04:27:43.6877707+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.5143298+00:00","snapshotPublishedAt":"2026-11-11T03:32: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-456002455e0ab94bb92c95476d4e6d175c104cd594749982afd96c893728ecbc","complete":true,"records":2010,"lastAttemptAt":"2026-11-12T01:56:45.2815945+00:00","lastSuccessAt":"2026-11-11T02:36:58.1276999+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.2815945+00:00","snapshotPublishedAt":"2026-11-11T01:17:51+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-baa8362b4daf9e5f39d5563775a55935e7b442c0735d33274a921579ce4a0d66","complete":true,"records":3093,"lastAttemptAt":"2026-11-12T01:56:45.6894904+00:00","lastSuccessAt":"2026-11-11T13:00:02.5446881+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.6894904+00:00","snapshotPublishedAt":"2026-11-11T12:47:47+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-685fe7fb2b690656c910a1ea42a9d294e8353311ac8ecfa691a9b0ff1b328804","complete":true,"records":231695,"lastAttemptAt":"2026-11-12T01:56:45.3885824+00:00","lastSuccessAt":"2026-11-11T21:58:47.7265713+00:00","error":null,"lastVerifiedAt":"2026-11-12T01:56:45.3885824+00:00","snapshotPublishedAt":"2026-11-11T21:48:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}