Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. tar
  4. ›
  5. GHSA-3pv8-6f4r-ffg2

GHSA-3pv8-6f4r-ffg2: tar has a PAX header desynchronization issue

May 29, 2026

When 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.

Per POSIX pax, 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.

As 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.

References

  • github.com/advisories/GHSA-3pv8-6f4r-ffg2
  • github.com/composefs/tar-rs/commit/bab14dd84b411ac16ecb56d4f2d2f7bfb88a9838
  • github.com/composefs/tar-rs/pull/454
  • github.com/composefs/tar-rs/releases/tag/0.4.46
  • github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2

Code Behaviors & Features

Detect and mitigate GHSA-3pv8-6f4r-ffg2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.4.46

Fixed versions

  • 0.4.46

Solution

Upgrade to version 0.4.46 or above.

Weakness

  • CWE-20: Improper Input Validation
  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

Source file

cargo/tar/GHSA-3pv8-6f4r-ffg2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:35 +0000.