Lookup for vulnerabilities affecting packages.

Vulnerability_idVCID-19kb-chr9-x7fm
Summary
Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports
The Rust Security Response WG was notified that 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 XSS if the report is subsequently uploaded somewhere.

The severity of this vulnerability is "low" for users relying on dependencies from git, local paths, or alternative registries. Users who solely depend on crates.io are unaffected.


Note that **by design** Cargo allows code execution at build time, due to build scripts and procedural macros. The vulnerability in this advisory allows performing a subset of the possible damage in a harder to track down way. Your dependencies must still be trusted if you want to be protected from attacks, as it's possible to perform the same attacks with build scripts and procedural macros.

# Overview

Rust 1.60.0 [introduced](https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#cargo---timings) `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](https://github.com/rust-lang/cargo/pull/8814). 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 defined in the `Cargo.toml` file 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 by [turning the future incompatibility warning into an error](https://github.com/rust-lang/cargo/pull/12291).

# Affected versions

The vulnerability is present in all versions of Cargo after and including 1.60.0. Rust 1.72, to be released on August 24, will include a fix for it.

Users whose dependencies are entirely on crates.io are unaffected.

# Mitigations

We recommend users always excercise 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.
Aliases
0
alias CVE-2023-40030
1
alias GHSA-wrrj-h57r-vx9p
Fixed_packages
0
url pkg:deb/debian/rust-cargo@0.76.0-1?distro=trixie
purl pkg:deb/debian/rust-cargo@0.76.0-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.76.0-1%3Fdistro=trixie
1
url pkg:deb/debian/rust-cargo@0.86.0-2?distro=trixie
purl pkg:deb/debian/rust-cargo@0.86.0-2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.86.0-2%3Fdistro=trixie
2
url pkg:deb/debian/rust-cargo@0.86.0-2
purl pkg:deb/debian/rust-cargo@0.86.0-2
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.86.0-2
3
url pkg:deb/debian/rust-cargo@0.91.0-1?distro=trixie
purl pkg:deb/debian/rust-cargo@0.91.0-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.91.0-1%3Fdistro=trixie
Affected_packages
0
url pkg:cargo/cargo@1.60.0
purl pkg:cargo/cargo@1.60.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-19kb-chr9-x7fm
resource_url http://public2.vulnerablecode.io/packages/pkg:cargo/cargo@1.60.0
1
url pkg:deb/debian/rust-cargo@0.43.1-4?distro=trixie
purl pkg:deb/debian/rust-cargo@0.43.1-4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-19kb-chr9-x7fm
1
vulnerability VCID-fa6z-bb5y-jbg8
2
vulnerability VCID-n4fu-fzu3-sbex
3
vulnerability VCID-r9ky-9nbm-yucw
4
vulnerability VCID-ssct-y25y-3qbw
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.43.1-4%3Fdistro=trixie
2
url pkg:deb/debian/rust-cargo@0.43.1-4
purl pkg:deb/debian/rust-cargo@0.43.1-4
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-19kb-chr9-x7fm
1
vulnerability VCID-fa6z-bb5y-jbg8
2
vulnerability VCID-n4fu-fzu3-sbex
3
vulnerability VCID-r9ky-9nbm-yucw
4
vulnerability VCID-ssct-y25y-3qbw
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.43.1-4
3
url pkg:deb/debian/rust-cargo@0.66.0-1?distro=trixie
purl pkg:deb/debian/rust-cargo@0.66.0-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-19kb-chr9-x7fm
1
vulnerability VCID-fa6z-bb5y-jbg8
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.66.0-1%3Fdistro=trixie
4
url pkg:deb/debian/rust-cargo@0.66.0-1
purl pkg:deb/debian/rust-cargo@0.66.0-1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-19kb-chr9-x7fm
1
vulnerability VCID-fa6z-bb5y-jbg8
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/rust-cargo@0.66.0-1
References
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2023-40030
reference_id
reference_type
scores
0
value 0.00104
scoring_system epss
scoring_elements 0.28529
published_at 2026-04-04T12:55:00Z
1
value 0.00104
scoring_system epss
scoring_elements 0.28437
published_at 2026-04-11T12:55:00Z
2
value 0.00104
scoring_system epss
scoring_elements 0.28433
published_at 2026-04-09T12:55:00Z
3
value 0.00104
scoring_system epss
scoring_elements 0.2839
published_at 2026-04-08T12:55:00Z
4
value 0.00104
scoring_system epss
scoring_elements 0.28325
published_at 2026-04-18T12:55:00Z
5
value 0.00104
scoring_system epss
scoring_elements 0.28347
published_at 2026-04-16T12:55:00Z
6
value 0.00104
scoring_system epss
scoring_elements 0.28335
published_at 2026-04-13T12:55:00Z
7
value 0.00104
scoring_system epss
scoring_elements 0.28487
published_at 2026-04-02T12:55:00Z
8
value 0.00104
scoring_system epss
scoring_elements 0.28393
published_at 2026-04-12T12:55:00Z
9
value 0.00144
scoring_system epss
scoring_elements 0.34724
published_at 2026-04-21T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2023-40030
1
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40030
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40030
2
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 6.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
3
reference_url https://github.com/rust-lang/cargo
reference_id
reference_type
scores
0
value LOW
scoring_system generic_textual
scoring_elements
url https://github.com/rust-lang/cargo
4
reference_url https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33
reference_id
reference_type
scores
0
value 6.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-30T19:08:43Z/
url https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33
5
reference_url https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365
reference_id
reference_type
scores
0
value 6.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-30T19:08:43Z/
url https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365
6
reference_url https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p
reference_id
reference_type
scores
0
value 6.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
1
value LOW
scoring_system cvssv3.1_qr
scoring_elements
2
value LOW
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-30T19:08:43Z/
url https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p
7
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059305
reference_id 1059305
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059305
8
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059306
reference_id 1059306
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059306
9
reference_url https://github.com/rust-lang/cargo/pull/12291
reference_id 12291
reference_type
scores
0
value 6.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
1
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-30T19:08:43Z/
url https://github.com/rust-lang/cargo/pull/12291
10
reference_url https://github.com/advisories/GHSA-wrrj-h57r-vx9p
reference_id GHSA-wrrj-h57r-vx9p
reference_type
scores
0
value LOW
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-wrrj-h57r-vx9p
Weaknesses
0
cwe_id 79
name Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
description The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Exploits
Severity_range_score0.1 - 6.1
Exploitability0.5
Weighted_severity5.5
Risk_score2.8
Resource_urlhttp://public2.vulnerablecode.io/vulnerabilities/VCID-19kb-chr9-x7fm