diff --git a/crates/vortex-bittorrent/RUSTSEC-0000-0000.md b/crates/vortex-bittorrent/RUSTSEC-0000-0000.md new file mode 100644 index 000000000..b1b616cb6 --- /dev/null +++ b/crates/vortex-bittorrent/RUSTSEC-0000-0000.md @@ -0,0 +1,35 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" + +package = "vortex-bittorrent" + +date = "2026-10-26" + +url = "https://github.com/Nehliin/vortex/pull/164" + + +# You can overwrite arbitrary files that the library can access. +categories = ["file-disclosure"] + +# Freeform keywords which describe this vulnerability, similar to Cargo (optional) +keywords = ["bittorrent", "file", "symlink", "arbitrary-file-write"] + +# only linux is supported +[affected] +os = ["linux"] + +[affected.functions] +"vortex_bittorrent::file_store::File::new" = ["< 0.8.0"] + +[versions] +patched = [">= 0.8.0"] +``` + +# Arbitrary file write from downloading malicious torrents + +File paths from torrent metadata were not sanitized properly in `vortex-bittorrent`. A malicious torrent could exploit path traversal or symlink following to cause the library to create or write to files outside the intended download directory. + +This could allow an attacker to overwrite existing files that the application has permission to read and write, provided the torrent's corresponding data is downloaded. + +This was fixed in version 0.8.0 which adds validation to file paths and directory relative filesystem operations.