{"id":"GHSA-wrrj-h57r-vx9p","revision":null,"records":[{"revision":"8def0a5e547a4c21ad8911d5432e921e","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2023-40030","aliases":[],"title":"Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports","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.\n\nRust 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.\n\nThis 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.","state":0,"publishedAt":"2023-08-24T22:56:41.085+00:00","modifiedAt":"2024-09-30T19:09:34.361+00:00","affected":[{"ecosystem":"Vendor product","name":"cargo","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"rust-lang\",\n                    \"product\": \"cargo\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 1.60.0, < 1.72\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"severity":"MEDIUM"}],"references":["https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p","https://github.com/rust-lang/cargo/pull/12291","https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33","https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-40030","license":"CVE Program Terms of Use","key":"cve-program:CVE-2023-40030","identifiers":["CVE-2023-40030"]},"retained":false,"historicalAffected":[]},{"revision":"d2fe51a6510543c19f3921c68eb6b3b1","observedAt":"2026-11-19T02:36:01.001+00:00","statement":{"source":"euvd","id":"EUVD-2023-2375","aliases":["CVE-2023-40030","GHSA-wrrj-h57r-vx9p"],"title":"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 …","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.\n\nRust 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.\n\nThis 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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"severity":null}],"references":["https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p","https://github.com/rust-lang/cargo/pull/12291","https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33","https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-2375","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 24, 2023, 10:56:41 PM","dateUpdated":"Sep 30, 2024, 7:09:34 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2024:13262-1","title":"cargo1.72-1.72.1-1.1 on GA media","vulnerabilityIds":["CVE-2023-40030"]},{"id":"SUSE-SU-2023:3722-1","title":"Security update for rust, rust1.72","vulnerabilityIds":["CVE-2023-40030"]},{"id":"msrc_CVE-2023-40030","title":"Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports","vulnerabilityIds":["CVE-2023-40030"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2023-2375","identifiers":["EUVD-2023-2375","CVE-2023-40030","GHSA-wrrj-h57r-vx9p"]},"retained":false,"historicalAffected":[]},{"revision":"16e9d3d1012746ba889bc4699f9baeb5","observedAt":"2026-10-24T22:17:22.004+00:00","statement":{"source":"nvd","id":"CVE-2023-40030","aliases":[],"title":"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 …","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.\n\nRust 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.\n\nThis 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.","state":0,"publishedAt":"2023-08-24T23:15:09.287+00:00","modifiedAt":"2026-06-17T06:15:50.403+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"severity":"MEDIUM"}],"references":["https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33","https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365","https://github.com/rust-lang/cargo/pull/12291","https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-40030","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-79"],"productCriteria":["cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2023-08-24T23:15:09.287","lastModified":"2026-06-17T06:15:50.403"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2023-40030","identifiers":["CVE-2023-40030"]},"retained":false,"historicalAffected":[]},{"revision":"ec915f43ba254912b4ca7c5dcde3ac50","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-wrrj-h57r-vx9p","aliases":["CVE-2023-40030"],"title":"Malicious dependencies can inject arbitrary JavaScript into cargo-generated timing reports","description":"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.\n\nThe 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.\n\n\nNote 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.\n\n# Overview\n\nRust 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.\n\nPrior 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.\n\nAs 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.\n\nThis issue was fixed by [turning the future incompatibility warning into an error](https://github.com/rust-lang/cargo/pull/12291).\n\n# Affected versions\n\nThe 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.\n\nUsers whose dependencies are entirely on crates.io are unaffected.\n\n# Mitigations\n\nWe 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.\n\ncrates.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.","state":0,"publishedAt":"2023-08-24T22:15:51+00:00","modifiedAt":"2026-09-10T03:49:57.7099431+00:00","affected":[{"ecosystem":"crates.io","name":"cargo","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"1.60.0"},{"kind":"fixed","version":"1.72"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/rust-lang/cargo/security/advisories/GHSA-wrrj-h57r-vx9p","https://github.com/rust-lang/cargo/commit/9835622853f08be9a4b58ebe29dcec8f43b64b33","https://github.com/rust-lang/cargo/commit/f975722a0eac934c0722f111f107c4ea2f5c4365","https://github.com/rust-lang/cargo"],"sourceUrl":"https://github.com/advisories/GHSA-wrrj-h57r-vx9p","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-wrrj-h57r-vx9p","identifiers":["GHSA-wrrj-h57r-vx9p","CVE-2023-40030"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:37.372166+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.3721666+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-0e69c6613585444f641c92f526100c36dd9cd3e99fef2d7247efc88cf506728d","complete":true,"records":428229,"lastAttemptAt":"2026-11-19T04:22:50.7413942+00:00","lastSuccessAt":"2026-11-19T04:22:50.7221018+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.7413942+00:00","snapshotPublishedAt":"2026-11-19T03:23:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eed1ef18663c45929f7d7e7a714a8e59","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T04:31:06.4268449+00:00","lastSuccessAt":"2026-11-19T04:31:06.423+00:00","error":"148 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T04:31:06.423+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13703,"expectedIdentifiers":13908,"failedIdentifiers":148},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:38.0697004+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:38.0697013+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T04:24:39.3964736+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T04:24:37.034158+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.034158+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T04:22:50.8981544+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.8981544+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T04:24:37.1431899+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.1431899+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2556fa291ec863b7fd77332e55dcff5569878e06b48ea32c182e52878cdd1ce8","complete":true,"records":232702,"lastAttemptAt":"2026-11-19T04:24:36.8996689+00:00","lastSuccessAt":"2026-11-19T04:24:35.8955272+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:36.8996689+00:00","snapshotPublishedAt":"2026-11-19T03:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}