fix: update to astral-tokio-tar for CVE (#7423)

* fix: Migrate to astral-tokio-tar to address CVE-2025-62518

Migrates from the abandoned tokio-tar library to the actively maintained astral-tokio-tar to address CVE-2025-62518 (TARmageddon), a high-severity RCE vulnerability (CVSS 8.1). The vulnerability involves a boundary-parsing bug in PAX/ustar header handling that enables file smuggling attacks via malicious TAR archives.

This is a drop-in replacement requiring only dependency updates in Cargo.toml files. The astral-tokio-tar library uses the same tokio_tar module name, so no source code changes are needed. All references to the vulnerable tokio-tar v0.3.1 have been removed from Cargo.lock and replaced with the patched astral-tokio-tar v0.5.6.

Related to previous PR #6943 which was closed due to CLA issues. Security disclosure available at https://edera.dev/stories/tarmageddon and patch details at https://github.com/astral-sh/tokio-tar/releases/tag/v0.5.6

* update

---------

Co-authored-by: Devdatta Talele <devtalele0@gmail.com>
Co-authored-by: Devdatta Talele <50290838+devdattatalele@users.noreply.github.com>
This commit is contained in:
Ruben Fiszel
2025-12-20 11:04:36 +02:00
committed by GitHub
parent 0c0c2f62a5
commit 5ee02de5df
4 changed files with 25 additions and 33 deletions

52
backend/Cargo.lock generated
View File

@@ -559,6 +559,22 @@ dependencies = [
"syn 2.0.111",
]
[[package]]
name = "astral-tokio-tar"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec179a06c1769b1e42e1e2cbe74c7dcdb3d6383c838454d063eaac5bbb7ebbe5"
dependencies = [
"filetime",
"futures-core",
"libc",
"portable-atomic",
"rustc-hash 2.1.1",
"tokio",
"tokio-stream",
"xattr",
]
[[package]]
name = "async-broadcast"
version = "0.7.2"
@@ -5368,9 +5384,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
[[package]]
name = "flatbuffers"
version = "25.9.23"
version = "25.12.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09b6620799e7340ebd9968d2e0708eb82cf1971e9a16821e2091b6d6e475eed5"
checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3"
dependencies = [
"bitflags 2.9.4",
"rustc_version 0.4.1",
@@ -8623,9 +8639,9 @@ dependencies = [
[[package]]
name = "ntapi"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081"
dependencies = [
"winapi",
]
@@ -10552,15 +10568,6 @@ dependencies = [
"syn 2.0.111",
]
[[package]]
name = "redox_syscall"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
@@ -13825,21 +13832,6 @@ dependencies = [
"tokio",
]
[[package]]
name = "tokio-tar"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75"
dependencies = [
"filetime",
"futures-core",
"libc",
"redox_syscall 0.3.5",
"tokio",
"tokio-stream",
"xattr",
]
[[package]]
name = "tokio-tungstenite"
version = "0.24.0"
@@ -15241,6 +15233,7 @@ version = "1.595.0"
dependencies = [
"anyhow",
"argon2",
"astral-tokio-tar",
"async-nats",
"async-oauth2",
"async-recursion",
@@ -15331,7 +15324,6 @@ dependencies = [
"tokio-postgres 0.7.11",
"tokio-postgres 0.7.13",
"tokio-stream",
"tokio-tar",
"tokio-tungstenite",
"tokio-util",
"tonic",
@@ -15521,6 +15513,7 @@ name = "windmill-indexer"
version = "1.595.0"
dependencies = [
"anyhow",
"astral-tokio-tar",
"bytes",
"chrono",
"const_format",
@@ -15534,7 +15527,6 @@ dependencies = [
"tantivy",
"tempfile",
"tokio",
"tokio-tar",
"tracing",
"uuid",
"windmill-common",

View File

@@ -260,7 +260,7 @@ reqwest = { version = "=0.12.24", features = ["json", "stream", "gzip", "multipa
eventsource-stream = "0.2.3"
time = "^0"
serde_urlencoded = "^0"
tokio-tar = "^0"
astral-tokio-tar = "^0.5.6"
tempfile = "^3"
tokio-util = { version = "^0", features = ["io"] }
json-pointer = "^0"

View File

@@ -92,7 +92,7 @@ mail-parser = { workspace = true, features = ["serde_support"], optional = true
magic-crypt.workspace = true
tempfile.workspace = true
tokio-util.workspace = true
tokio-tar.workspace = true
astral-tokio-tar.workspace = true
tokio-postgres.workspace = true
postgres-native-tls.workspace = true
hmac.workspace = true

View File

@@ -29,7 +29,7 @@ futures.workspace = true
tempfile.workspace = true
bytes.workspace = true
object_store = { workspace = true, optional = true}
tokio-tar.workspace = true
astral-tokio-tar.workspace = true
lazy_static.workspace = true
const_format.workspace = true
flume.workspace = true