{"id":"GHSA-3pv8-6f4r-ffg2","revision":null,"records":[{"revision":"872913bf2f204f02a58b3a2512f80dbd","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-3pv8-6f4r-ffg2","aliases":[],"title":"tar has a PAX header desynchronization issue","description":"### Summary\n\nWhen a tar stream contains multiple \"header\" entries prior to a file entry, tar-rs applies the PAX header (`x`) to the _next_ entry in the stream, regardless of type. For example, a stream of `x -> L -> file` (PAX, GNU longname, file) would result in `x`'s extensions being applied to `L` rather than to `file`.\n\n[Per POSIX pax](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/pax.html), this is incorrect: a PAX header always applies to a file entry, not any intermediary entries. See the \"pax Header Block\" section for the specific prescription there.\n\nAs a result of this, an attacker can contrive a tar containing a sequence of tar headers such that tar-rs applies the PAX header's `size` extension to the next header in sequence, effectively desynchronizing the stream and enabling tar-rs specific skippage/extraction of members. In other words, a file can be contrived to extract differently on tar-rs than on other tar parsers.\n\n### PoC\n\n[This tar](https://github.com/user-attachments/files/27141941/pax-overrides-extension-header.tar.zip) (zipped for size) demonstrates the desynchronization: with `tar tvf`:\n\n```\n% tar tvf tests/archives/pax-overrides-extension-header.tar \n----------  0 0      0        2048 Dec 31  1969 longname.txt\n----------  0 0      0           0 Dec 31  1969 file_b\n```\n\nwith `tar-rs`:\n\n```\n---- pax_size_does_not_apply_to_extension_headers stdout ----\n\nthread 'pax_size_does_not_apply_to_extension_headers' (250476889) panicked at tests/all.rs:2121:27:\ncalled `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: \"numeric field was not a number: AAAAAAAA when getting cksum for AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" }\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n```\n\nIn the above case, the PoC is not weaponized, so it jumps into the middle of an entry and subsequently fails the checksum test rather than silently continuing with attacker-controlled archive state.\n\n### Impact\n\nThis is very similar to GHSA-j5gw-2vrg-8fgx and GHSA-fp55-jw48-c537 in impact -- an attacker can use this to extract (or not extract) files from a tar stream depending on the tar parser used, which in turn can be used to obscure the presence of malicious files.","state":0,"publishedAt":"2026-05-29T19:16:12+00:00","modifiedAt":"2026-09-10T03:51:04.4548104+00:00","affected":[{"ecosystem":"crates.io","name":"tar","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.4.46"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2","https://github.com/composefs/tar-rs/pull/454","https://github.com/composefs/tar-rs/commit/bab14dd84b411ac16ecb56d4f2d2f7bfb88a9838","https://github.com/composefs/tar-rs","https://github.com/composefs/tar-rs/releases/tag/0.4.46"],"sourceUrl":"https://github.com/advisories/GHSA-3pv8-6f4r-ffg2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-3pv8-6f4r-ffg2","identifiers":["GHSA-3pv8-6f4r-ffg2"]},"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-16T08:30:46.6793194+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T08:30:46.6793194+00:00","lastSuccessAt":"2026-11-16T08:30:46.8328706+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.8328717+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-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-0d0698531b6388f35e338e054da40f0ccbc0a649cfd16195db63cd1681c3b5e5","complete":true,"records":425883,"lastAttemptAt":"2026-11-16T08:30:46.2657688+00:00","lastSuccessAt":"2026-11-16T08:30:46.2568407+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.2657688+00:00","snapshotPublishedAt":"2026-11-16T07:37:10+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-82d9a9fcefd8411fbce85a2be8dc81ec","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T08:35:26.6765861+00:00","lastSuccessAt":"2026-11-16T08:35:26.672+00:00","error":"114 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T08:35:26.672+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13760,"expectedIdentifiers":13874,"failedIdentifiers":114},{"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-16T08:30:46.6793194+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T08:30:46.6793194+00:00","lastSuccessAt":"2026-11-16T08:30:46.8336544+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.8336546+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-4fef0af0d2174a1fb1c51091c7dbd455","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T08:31:19.396193+00:00","lastSuccessAt":"2026-11-16T08:31:19.393+00:00","error":"600 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T08:31:19.393+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13274,"expectedIdentifiers":13874,"failedIdentifiers":600},{"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-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T08:30:46.6310988+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.6310988+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+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-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T08:30:46.4166589+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.4166589+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+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-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T08:30:46.6489716+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.6489716+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+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-263d9c8d63997345727b11314d9b9377eba9fd4146f04497c069a15e332b60cb","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T08:30:46.5196945+00:00","lastSuccessAt":"2026-11-16T07:32:30.5701252+00:00","error":null,"lastVerifiedAt":"2026-11-16T08:30:46.5196945+00:00","snapshotPublishedAt":"2026-11-16T06:48:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}