
Cloud Vulnerability DB
A community-led vulnerabilities database
Cargo, starting in Rust 1.60.0 and prior to 1.72, contained a vulnerability where feature names in the report generated by cargo build --timings were not properly escaped. This vulnerability (CVE-2023-40030) was discovered and disclosed in August 2023. The issue affects users who rely on dependencies from git, local paths, or alternative registries, while users who solely depend on crates.io are unaffected (Rust Advisory).
The vulnerability stems from Cargo's handling of feature names in timing reports. Prior to Rust 1.72, Cargo feature names could contain almost any characters, with some syntax-related exceptions. While Rust 1.49 introduced warnings about certain characters in feature names, these names were included unescaped in the timings report. This could allow malicious packages to inject arbitrary HTML and potentially JavaScript into the report (Rust Advisory). The vulnerability has a CVSS score of 6.1, indicating medium severity (Oracle Bulletin).
If exploited, this vulnerability could lead to cross-site scripting (XSS) attacks if the timing report is uploaded to a web location. However, it's important to note that Cargo already allows code execution at build time through build scripts and procedural macros, so this vulnerability represents a subset of possible attacks that could be performed in a way that's harder to track (Rust Advisory).
The vulnerability was fixed in Rust 1.72 by converting the feature name validation check from a warning to a hard error. This change prevents the use of potentially dangerous characters in feature names. Users should upgrade to Rust 1.72 or later to mitigate this vulnerability (Rust Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."