ALAS2-2024-2426
Active ModerateALAS2-2024-2426 (medium): rust
Related CVEs
CVE identifiers linked by this publisher.
Publisher relationship details 1 records
| CVE | Relationship | Publisher CVE field | Publisher evidence |
|---|---|---|---|
| CVE-2023-40030 | Listed by advisoryExact relationship valueadvisory_list | Publisher referencesExact field valuereferences | https://alas.aws.amazon.com/AL2/ALAS2-2024-2426.html |
Description
Cargo downloads a Rust project's dependencies and compiles the project. Starting in Rust 1.60.0 and prior to 1.72, Cargo did not escape Cargo feature names when including them in the report generated by `cargo build --timings`. A malicious package included as a dependency may inject nearly arbitrary HTML here, potentially leading to cross-site scripting if
Read full publisher description 2209 characters
Cargo downloads a Rust project's dependencies and compiles the project. Starting in Rust 1.60.0 and prior to 1.72, Cargo did not escape Cargo feature names when including them in the report generated by `cargo build --timings`. A malicious package included as a dependency may inject nearly arbitrary HTML here, potentially leading to cross-site scripting if the report is subsequently uploaded somewhere. The vulnerability affects users relying on dependencies from git, local paths, or alternative registries. Users who solely depend on crates.io are unaffected. Rust 1.60.0 introduced `cargo build --timings`, which produces a report of how long the different steps of the build process took. It includes lists of Cargo features for each crate. Prior to Rust 1.72, Cargo feature names were allowed to contain almost any characters (with some exceptions as used by the feature syntax), but it would produce a future incompatibility warning about them since Rust 1.49. crates.io is far more stringent about what it considers a valid feature name and has not allowed such feature names. As the feature names were included unescaped in the timings report, they could be used to inject Javascript into the page, for example with a feature name like `features = ["<img src='' onerror=alert(0)"]`. If this report were subsequently uploaded to a domain that uses credentials, the injected Javascript could access resources from the website visitor. This issue was fixed in Rust 1.72 by turning the future incompatibility warning into an error. Users should still exercise care in which package they download, by only including trusted dependencies in their projects. Please note that even with these vulnerabilities fixed, by design Cargo allows arbitrary code execution at build time thanks to build scripts and procedural macros: a malicious dependency will be able to cause damage regardless of these vulnerabilities. crates.io has server-side checks preventing this attack, and there are no packages on crates.io exploiting these vulnerabilities. crates.io users still need to excercise care in choosing their dependencies though, as remote code execution is allowed by design there as well. (CVE-2023-40030)
Solution
Run yum update rust or yum update --advisory ALAS2-2024-2426 to update your system.
Affected packages
Each item is one publisher package occurrence. Shared details are shown once; differences stay with the occurrence.
Shared package data
Applies to all 4 occurrences-
1rust
Occurrence-specific details
- Architecture
- aarch64
Replacement RPMs
- rust-1.68.2-1.amzn2.0.4.aarch64
- rust-std-static-1.68.2-1.amzn2.0.4.aarch64
- rust-doc-1.68.2-1.amzn2.0.4.aarch64
- cargo-1.68.2-1.amzn2.0.4.aarch64
- rustfmt-1.68.2-1.amzn2.0.4.aarch64
- rust-analyzer-1.68.2-1.amzn2.0.4.aarch64
- clippy-1.68.2-1.amzn2.0.4.aarch64
- rust-analysis-1.68.2-1.amzn2.0.4.aarch64
- rust-debuginfo-1.68.2-1.amzn2.0.4.aarch64
-
2rust
Occurrence-specific details
- Architecture
- noarch
Replacement RPMs
- rust-debugger-common-1.68.2-1.amzn2.0.4.noarch
- rust-gdb-1.68.2-1.amzn2.0.4.noarch
- rust-src-1.68.2-1.amzn2.0.4.noarch
- rust-toolset-1.68.2-1.amzn2.0.4.noarch
-
3rust
Occurrence-specific details
- Architecture
- src
Replacement RPMs
- rust-1.68.2-1.amzn2.0.4.src
-
4rust
Occurrence-specific details
- Architecture
- x86_64
Replacement RPMs
- rust-1.68.2-1.amzn2.0.4.x86_64
- rust-std-static-1.68.2-1.amzn2.0.4.x86_64
- rust-doc-1.68.2-1.amzn2.0.4.x86_64
- cargo-1.68.2-1.amzn2.0.4.x86_64
- rustfmt-1.68.2-1.amzn2.0.4.x86_64
- rust-analyzer-1.68.2-1.amzn2.0.4.x86_64
- clippy-1.68.2-1.amzn2.0.4.x86_64
- rust-analysis-1.68.2-1.amzn2.0.4.x86_64
- rust-debuginfo-1.68.2-1.amzn2.0.4.x86_64
CVSS assessments
Publisher supplied scores and vectors; these do not replace the advisory severity above.
No CVSS assessments were provided.
Publisher references
2- CVE-2023-40030 https://access.redhat.com/security/cve/CVE-2023-40030
- CVE-2023-40030 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40030
Provenance
- Schema version
- Unknown
- Parser version
- amazon-alas/1
- Severity origin
- publisher
| Kind | Locator | Source commit | Document hash | Parser | Fetched |
|---|---|---|---|---|---|
| html_page | https://alas.aws.amazon.com/AL2/ALAS2-2024-2426.html | Unknown | d553d7a45a69a261e01d7e3f84e9135891792b6b4f5529372ff8d6f2c6a40678 | amazon-alas/1 | 2026-09-26T01:34:09Z |
| rss_entry | https://alas.aws.amazon.com/AL2/ALAS2-2024-2426.html | Unknown | Unknown | amazon-alas/1 | 2026-09-26T01:34:09Z |
| catalog_entry | https://alas.aws.amazon.com/AL2/ALAS2-2024-2426.html | Unknown | Unknown | amazon-alas/1 | 2026-09-26T01:34:09Z |