Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2023-40030

published medium CVSS 3.1 · 6.1

Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports

Published
24 Aug 2023, 22:56:41 UTC
Updated
30 Sep 2024, 19:09:34 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
rust-lang — cargo>= 1.60.0, < 1.72 Affected Not stated GitHub_M
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2-2024-2426 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2024-497 Fixed Not stated Amazon Linux assessment
SUSE / openSUSE SLE-15-SP4 cargoaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
Amazon Linux AL2 rustaarch64 Listed in advisory Not stated ALAS2-2024-2426
SUSE / openSUSE SLE-15-SP4 cargoppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 cargos390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
Show 76 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
SUSE / openSUSE SLE-15-SP4 cargox86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargoaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargoppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargos390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargox86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargoaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargoppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargos390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargox86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargoaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargoppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargos390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargox86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 cargo1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 cargo1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 cargo1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 cargo1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rustaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rustppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rusts390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rustx86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rust1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rust1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rust1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP4 rust1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargo1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargo1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargo1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 cargo1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rustaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rustppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rusts390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rustx86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rust1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rust1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rust1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE SLE-15-SP5 rust1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargo1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargo1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargo1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 cargo1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rustaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rustppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rusts390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rustx86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rust1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rust1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rust1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.4 rust1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargo1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargo1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargo1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 cargo1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rustaarch64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rustppc64le Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rusts390x Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rustx86_64 Advisory build 1.72.0-150400.24.24.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rust1.72aarch64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rust1.72ppc64le Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rust1.72s390x Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Leap-15.5 rust1.72x86_64 Advisory build 1.72.0-150400.9.3.1 SUSE-SU-2023:3722-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.72aarch64 Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.72ppc64le Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.72s390x Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.72x86_64 Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.72aarch64 Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.72ppc64le Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.72s390x Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.72x86_64 Advisory build 1.72.1-1.1 OPENSUSE-SU-2024:13262-1
Amazon Linux AL2 rustnoarch Listed in advisory Not stated ALAS2-2024-2426
Amazon Linux AL2 rustsrc Listed in advisory Not stated ALAS2-2024-2426
Amazon Linux AL2 rustx86_64 Listed in advisory Not stated ALAS2-2024-2426
Amazon Linux AL2023 rustaarch64 Listed in advisory Not stated ALAS2023-2024-497
Amazon Linux AL2023 rustnoarch Listed in advisory Not stated ALAS2023-2024-497
Amazon Linux AL2023 rustsrc Listed in advisory Not stated ALAS2023-2024-497
Amazon Linux AL2023 rustx86_64 Listed in advisory Not stated ALAS2023-2024-497

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 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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

7

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
6.1 / 10
Severity
medium
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
rust-lang cargo >= 1.60.0, < 1.72 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (GitHub_M · cna)

References

4

Provider assertions

3

GitHub_M · cna

Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
fc8fa9b62b82a654cf6e25c1f23dd2045a4c1c178fc5a2e63fe539fbae16dcd8
Ingested
23 Sep 2026, 08:11:15 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected