{"id":"GHSA-m9p2-fxp5-v3fp","summary":"Diesel: Command injection in Diesel's implementation of `COPY FROM`/`COPY TO`","details":"Diesel allows users to configure various options for PostgreSQL's `COPY FROM` and `COPY TO` statements. These configurations are partially provided as strings or characters. \n\nDiesel did not check if any these user-provided options contain a quote character `'`, which can lead to the injection of additional options in the current `COPY FROM`/`COPY TO` statement. \n\nThis vulnerability affects any user of `COPY FROM`/`COPY TO` that passes user-provided input to any of the affected functions. It can result in modifications of options in the current statement, but it is not possible inject additional statements.\n\n## Mitigation\n\nThe preferred mitigation to the outlined problem is to update to Diesel version 2.3.8 or newer, which includes fixes for the problem.\n\n## Resolution\n\nDiesel now correctly escapes any quotes contained in the provided arguments.","aliases":["RUSTSEC-2026-0136"],"modified":"2026-05-20T07:26:23.724197936Z","published":"2026-05-19T19:42:00Z","database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-88"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-05-19T19:42:00Z"},"references":[{"type":"WEB","url":"https://github.com/diesel-rs/diesel/pull/5042"},{"type":"PACKAGE","url":"https://github.com/diesel-rs/diesel"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0136.html"}],"affected":[{"package":{"name":"diesel","ecosystem":"crates.io","purl":"pkg:cargo/diesel"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.3.8"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-m9p2-fxp5-v3fp/GHSA-m9p2-fxp5-v3fp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"}]}