GHSA-3cv2-h65g-fgmm: Astral tokio tar Astral-tokio-tar Has A PAX Header Vulnerability

MODERATE
CWE-843 CWE-20
Published
Advisory Summary

GHSA-3cv2-h65g-fgmm is a MODERATE astral-tokio-tar has a pax header vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Astral tokio tar libraries in the crates.io ecosystem. The issue involves astral-tokio-tar has a pax header desynchronization issue. Remediation is available by upgrading affected packages to version 0.6.2.

GHSA-3cv2-h65g-fgmm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-3cv2-h65g-fgmm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
Affected Product Astral tokio tar
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-3cv2-h65g-fgmm

To remediate this vulnerability, upgrade all affected Astral tokio tar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

astral-tokio-tar fixed: 0.6.2
Upgrade astral-tokio-tar to 0.6.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for astral-tokio-tar

How to Check if You Are Affected

To determine whether your application is affected by GHSA-3cv2-h65g-fgmm, inspect your project dependencies for Astral tokio tar:

inspect dependencies for astral-tokio-tar

Analyze the terminal output to locate any version of Astral tokio tar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In Astral tokio tar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Versions of astral-tokio-tar prior to 0.6.2 contain a PAX header interpretation bug that allows manipulated entries to be made selectively visible or invisible during extraction with astral-tokio-tar versus other tar implementations. An attacker could use this differential to smuggle unexpected files onto a victim's filesystem. ### Details When a tar stream contains multiple "header" entries prior to a file entry, astral-tokio-tar 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](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. As a result of this, an attacker can contrive a tar containing a sequence of tar headers such that astral-tokio-tar applies the PAX header's size extension to the next header in sequence, effectively desynchronizing the stream and enabling astral-tokio-tar specific skippage/extraction of members. In other words, a file can be contrived to extract differently on astral-tokio-tar than on other tar parsers. ### Patches Versions 0.6.2 and newer of astral-tokio-tar address this differential. ### Workarounds Users are advised to upgrade to version 0.6.1 or newer to address this advisory. There is no workaround other than upgrading. Users should experience no breaking changes as a result of the upgrade. ### Resources - GHSA-j5gw-2vrg-8fgx is a similar PAX desynchronization bug - GHSA-fp55-jw48-c537 is another similar PAX desynchronization bug

GHSA-3cv2-h65g-fgmm Affected Astral tokio tar Versions

1 component(s)
Fixed Versions:
0.6.2
Product / Package Ecosystem Affected Versions Fixed Version
astral-tokio-tar
crates.io
< 0.6.2
0.6.2

References

Frequently Asked Questions

What is GHSA-3cv2-h65g-fgmm?
GHSA-3cv2-h65g-fgmm is a security vulnerability in Astral tokio tar involving astral-tokio-tar has a PAX Header Desynchronization issue under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which Astral tokio tar versions are affected?
Affected versions include releases prior to 0.6.2 across affected packages: astral-tokio-tar.
What version fixes GHSA-3cv2-h65g-fgmm?
Upgrading to 0.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is astral-tokio-tar affected?
Yes, astral-tokio-tar is affected in releases prior to 0.6.2. Upgrade your dependency to 0.6.2 or later.
What CWE is associated with GHSA-3cv2-h65g-fgmm?
GHSA-3cv2-h65g-fgmm is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') (The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.).
How can I check crates.io dependencies for GHSA-3cv2-h65g-fgmm?
Run the dependency tree command: 'inspect dependencies for astral-tokio-tar'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3cv2-h65g-fgmm",
  "modified" : "2026-05-29T19:08:23Z",
  "published" : "2026-05-29T19:08:23Z",
  "aliases" : [ ],
  "summary" : "astral-tokio-tar has a PAX Header Desynchronization issue",
  "details" : "### Impact\n\nVersions of astral-tokio-tar prior to 0.6.2 contain a PAX header interpretation bug that allows manipulated entries to be made selectively visible or invisible during extraction with astral-tokio-tar versus other tar implementations. An attacker could use this differential to smuggle unexpected files onto a victim's filesystem.\n\n### Details\n\nWhen a tar stream contains multiple \"header\" entries prior to a file entry, astral-tokio-tar 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 astral-tokio-tar applies the PAX header's size extension to the next header in sequence, effectively desynchronizing the stream and enabling astral-tokio-tar specific skippage/extraction of members. In other words, a file can be contrived to extract differently on astral-tokio-tar than on other tar parsers.\n\n### Patches\n\nVersions 0.6.2 and newer of astral-tokio-tar address this differential.\n\n### Workarounds\n\nUsers are advised to upgrade to version 0.6.1 or newer to address this advisory.\n\nThere is no workaround other than upgrading. Users should experience no breaking changes as a result of the upgrade.\n\n### Resources\n\n- GHSA-j5gw-2vrg-8fgx is a similar PAX desynchronization bug\n- GHSA-fp55-jw48-c537 is another similar PAX desynchronization bug",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "astral-tokio-tar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.6.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/astral-sh/tokio-tar/security/advisories/GHSA-3cv2-h65g-fgmm"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/astral-sh/tokio-tar"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2026-0145.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-843" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-29T19:08:23Z",
    "nvd_published_at" : null
  }
}