資安漏洞
最後更新
依公布年份列出影響 Rust 標準庫(std)與工具鏈(rustc、cargo、rustdoc)的所有已知漏洞;摘要為官方原文,「影響範圍」與「修正於」都換算成 Rust 版本號。
想知道某個版本受哪些漏洞影響,請看該版本頁的「已知漏洞」;檢查專案相依的第三方 crate 有沒有漏洞,用
cargo install cargo-audit 後執行 cargo audit(資料來自 RustSec)。社群資安討論(Hacker News)
近一年 Hacker News 上與 Rust 標準庫、工具鏈資安相關的討論,依日期排序;有對應官方漏洞編號的會一併列出。標題與連結為原文,內容以官方公告為準。
| 日期 | 標題 | 分數/留言 | 官方編號 |
|---|---|---|---|
| 2026-03-21 | Security Advisory for Cargo(討論) | 11/0 | CVE-2026-33056 |
2026
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2025-15661 | cargo | Cargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2 | 未公布 | 1.96.1 |
| CVE-2026-55199 | cargo | Cargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2 | 未公布 | 1.96.1 |
| CVE-2026-55200 | cargo | Cargo: apply patches for CVE-2025-15661, CVE-2026-55199, and CVE-2026-55200 to libssh2 | 未公布 | 1.96.1 |
| CVE-2026-5222 | cargo | Cargo can be coerced to share credentials between registries | 早於 1.96.0 | 1.96.0 |
| CVE-2026-5223 | cargo | Crates in third party registries can override the cached source of other crates | 早於 1.96.0 | 1.96.0 |
| CVE-2026-40200 | vendored | Apply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl | 未公布 | 1.95.0 |
| CVE-2026-6042 | vendored | Apply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl | 未公布 | 1.95.0 |
| CVE-2026-33055 | cargo | Cargo: 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-33056 | cargo | Cargo: 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-11233 | std | Rust standard library didn't detect all path separators on Cygwin | 1.87.0 起,早於 1.89.0 | 1.89.0 |
2024
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2024-43402 | std | std::process::Command batch files argument escaping could be bypassed with trailing whitespace or periods | 早於 1.81.0 | 1.81.0 |
| CVE-2024-24576 | std | std::process::Command did not properly escape arguments of batch files on Windows | 早於 1.77.2 | 1.77.2 |
2023
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2023-40030 | cargo | Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports | 1.60.0 起,早於 1.72.0 | 1.72.0 |
| CVE-2023-38497 | cargo | Cargo not respecting umask when extracting crate archives | 早於 1.71.1 | 1.71.1 |
| CVE-2022-46176 | cargo | Cargo did not verify SSH host keys | 早於 1.66.1 | 1.66.1 |
2022
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2022-36113 | cargo | Extracting malicious crates can corrupt arbitrary files | 早於 1.64.0 | 1.64.0 |
| CVE-2022-36114 | cargo | Extracting malicious crates can fill the file system | 早於 1.64.0 | 1.64.0 |
| CVE-2022-21658 | std | Race condition in std::fs::remove_dir_all | 早於 1.58.1 | 1.58.1 |
2021
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2021-42574 | rustc | rustc and bidirectional-override codepoints in source code | 早於 1.56.1 | 1.56.1 |
| CVE-2021-31162 | std | Double free in Vec::from_iter specialization when drop panics | 1.48.0 起,早於 1.52.0 | 1.52.0 |
| CVE-2021-28878 | std | Zip may call __iterator_get_unchecked twice with the same index | 1.14.0 起,早於 1.52.0 | 1.52.0 |
| CVE-2021-28879 | std | Zip can cause buffer overflow when a consumed Zip iterator is used again | 1.14.0 起,早於 1.52.0 | 1.52.0 |
| CVE-2021-28876 | std | Panic safety issue in Zip specialization | 1.14.0 起,早於 1.52.0 | 1.52.0 |
| CVE-2021-28875 | std | Logic bug in Read can cause buffer overflow in read_to_end() | 1.20.0 起,早於 1.50.0 | 1.50.0 |
| CVE-2021-28877 | std | TrustedRandomAccess specialization composes incorrectly for nested iter::Zips | 1.11.0 起,早於 1.51.0 | 1.51.0 |
2020
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2020-36323 | std | API soundness issue in join() implementation of [Borrow<str>] | 1.28.0 起,早於 1.52.0 | 1.52.0 |
| CVE-2020-36318 | std | VecDeque::make_contiguous may duplicate the contained elements | 1.48.0 起,早於 1.49.0 | 1.49.0 |
| CVE-2020-36317 | std | String::retain allows safely creating invalid strings when abusing panic | 1.26.0 起,早於 1.49.0 | 1.49.0 |
| CVE-2020-1967 | vendored | Updated openssl-src to 1.1.1g for CVE-2020-1967. | 未公布 | 1.43.1 |
| CVE-2021-29922 | std | Improper Input Validation of octal literals in std::net | 早於 1.53.0 | 1.53.0 |
2019
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2019-16760 | cargo | Cargo prior to Rust 1.26.0 may download the wrong dependency | 早於 1.26.0 | 1.26.0 |
| CVE-2019-12083 | std | Memory safety vulnerabilities arising from Error::type_id | 1.34.0 起,早於 1.34.2 | 1.34.2 |
2018
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2018-1000810 | std | Buffer overflow vulnerability in str::repeat() | 1.26.0 起,早於 1.29.1 | 1.29.1 |
| CVE-2019-1010299 | std | vec_deque::Iter has unsound Debug implementation | 1.18.0 起,早於 1.30.0 | 1.30.0 |
| CVE-2018-1000657 | std | Buffer overflow vulnerability in VecDeque::reserve() | 1.3.0 起,早於 1.22.0 | 1.22.0 |
| CVE-2018-1000622 | rustdoc | Uncontrolled search path element vulnerability in rustdoc plugins | 早於 1.27.1 | 1.27.1 |
| CVE-2018-25008 | std | Insufficient synchronization in Arc::get_mut | 1.3.0 起,早於 1.29.0 | 1.29.0 |
2017
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2017-20004 | std | MutexGuard<Cell<i32>> must not be Sync | 早於 1.19.0 | 1.19.0 |
2015
| 編號 | 元件 | 摘要(官方原文) | 影響範圍 | 修正於 |
|---|---|---|---|---|
| CVE-2015-20001 | std | Panic safety violation in BinaryHeap | 早於 1.2.0 | 1.2.0 |
資料來源
- rust-lang/rust 安全公告
- rust-lang/cargo 安全公告
- RustSec Advisory Database:rust/(標準庫與工具鏈)
- Rust 安全政策
- Hacker News(透過 hn.algolia.com 搜尋 API)