資安漏洞

最後更新


依公布年份列出影響 Rust 標準庫(std)與工具鏈(rustc、cargo、rustdoc)的所有已知漏洞;摘要為官方原文,「影響範圍」與「修正於」都換算成 Rust 版本號。
想知道某個版本受哪些漏洞影響,請看該版本頁的「已知漏洞」;檢查專案相依的第三方 crate 有沒有漏洞,用 cargo install cargo-audit 後執行 cargo audit(資料來自 RustSec)。

社群資安討論(Hacker News)


近一年 Hacker News 上與 Rust 標準庫、工具鏈資安相關的討論,依日期排序;有對應官方漏洞編號的會一併列出。標題與連結為原文,內容以官方公告為準。
日期標題分數/留言官方編號
2026-03-21Security Advisory for Cargo(討論)11/0CVE-2026-33056

2026


編號元件摘要(官方原文)影響範圍修正於
CVE-2025-15661cargoCargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2未公布1.96.1
CVE-2026-55199cargoCargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2未公布1.96.1
CVE-2026-55200cargoCargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2未公布1.96.1
CVE-2026-5222cargoCargo can be coerced to share credentials between registries早於 1.96.01.96.0
CVE-2026-5223cargoCrates in third party registries can override the cached source of other crates早於 1.96.01.96.0
CVE-2026-40200vendoredApply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl未公布1.95.0
CVE-2026-6042vendoredApply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl未公布1.95.0
CVE-2026-33055cargoCargo: update tar to 0.4.45 This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected. See blog for more details.未公布1.94.1
CVE-2026-33056cargoCargo: update tar to 0.4.45 This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected. See blog for more details.未公布1.94.1

2025


編號元件摘要(官方原文)影響範圍修正於
CVE-2025-11233stdRust standard library didn't detect all path separators on Cygwin1.87.0 起,早於 1.89.01.89.0

2024


編號元件摘要(官方原文)影響範圍修正於
CVE-2024-43402stdstd::process::Command batch files argument escaping could be bypassed with trailing whitespace or periods早於 1.81.01.81.0
CVE-2024-24576stdstd::process::Command did not properly escape arguments of batch files on Windows早於 1.77.21.77.2

2023


編號元件摘要(官方原文)影響範圍修正於
CVE-2023-40030cargoMalicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports1.60.0 起,早於 1.72.01.72.0
CVE-2023-38497cargoCargo not respecting umask when extracting crate archives早於 1.71.11.71.1
CVE-2022-46176cargoCargo did not verify SSH host keys早於 1.66.11.66.1

2022


編號元件摘要(官方原文)影響範圍修正於
CVE-2022-36113cargoExtracting malicious crates can corrupt arbitrary files早於 1.64.01.64.0
CVE-2022-36114cargoExtracting malicious crates can fill the file system早於 1.64.01.64.0
CVE-2022-21658stdRace condition in std::fs::remove_dir_all早於 1.58.11.58.1

2021


編號元件摘要(官方原文)影響範圍修正於
CVE-2021-42574rustcrustc and bidirectional-override codepoints in source code早於 1.56.11.56.1
CVE-2021-31162stdDouble free in Vec::from_iter specialization when drop panics1.48.0 起,早於 1.52.01.52.0
CVE-2021-28878stdZip may call __iterator_get_unchecked twice with the same index1.14.0 起,早於 1.52.01.52.0
CVE-2021-28879stdZip can cause buffer overflow when a consumed Zip iterator is used again1.14.0 起,早於 1.52.01.52.0
CVE-2021-28876stdPanic safety issue in Zip specialization1.14.0 起,早於 1.52.01.52.0
CVE-2021-28875stdLogic bug in Read can cause buffer overflow in read_to_end()1.20.0 起,早於 1.50.01.50.0
CVE-2021-28877stdTrustedRandomAccess specialization composes incorrectly for nested iter::Zips1.11.0 起,早於 1.51.01.51.0

2020


編號元件摘要(官方原文)影響範圍修正於
CVE-2020-36323stdAPI soundness issue in join() implementation of [Borrow<str>]1.28.0 起,早於 1.52.01.52.0
CVE-2020-36318stdVecDeque::make_contiguous may duplicate the contained elements1.48.0 起,早於 1.49.01.49.0
CVE-2020-36317stdString::retain allows safely creating invalid strings when abusing panic1.26.0 起,早於 1.49.01.49.0
CVE-2020-1967vendoredUpdated openssl-src to 1.1.1g for CVE-2020-1967.未公布1.43.1
CVE-2021-29922stdImproper Input Validation of octal literals in std::net早於 1.53.01.53.0

2019


編號元件摘要(官方原文)影響範圍修正於
CVE-2019-16760cargoCargo prior to Rust 1.26.0 may download the wrong dependency早於 1.26.01.26.0
CVE-2019-12083stdMemory safety vulnerabilities arising from Error::type_id1.34.0 起,早於 1.34.21.34.2

2018


編號元件摘要(官方原文)影響範圍修正於
CVE-2018-1000810stdBuffer overflow vulnerability in str::repeat()1.26.0 起,早於 1.29.11.29.1
CVE-2019-1010299stdvec_deque::Iter has unsound Debug implementation1.18.0 起,早於 1.30.01.30.0
CVE-2018-1000657stdBuffer overflow vulnerability in VecDeque::reserve()1.3.0 起,早於 1.22.01.22.0
CVE-2018-1000622rustdocUncontrolled search path element vulnerability in rustdoc plugins早於 1.27.11.27.1
CVE-2018-25008stdInsufficient synchronization in Arc::get_mut1.3.0 起,早於 1.29.01.29.0

2017


編號元件摘要(官方原文)影響範圍修正於
CVE-2017-20004stdMutexGuard<Cell<i32>> must not be Sync早於 1.19.01.19.0

2015


編號元件摘要(官方原文)影響範圍修正於
CVE-2015-20001stdPanic safety violation in BinaryHeap早於 1.2.01.2.0

資料來源