Diesel: Command injection in Diesel's implementation of `COPY FROM`/`COPY TO`
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Code execution
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-88.
Summary
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. Diesel 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. This 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. ## Mitigation The preferred mitigation to the outlined problem is to update to Diesel version 2.3.8 or newer, which includes fixes for the problem. ## Resolution Diesel now correctly escapes any quotes contained in the provided arguments.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | diesel (crates.io) | before 2.3.8 | 2.3.8 | Patch available | GHSA-m9p2-fxp5-v3fp |
- diesel (crates.io) Vendor— Affected before 2.3.8 Fixed in 2.3.8 Patch available GHSA-m9p2-fxp5-v3fp
Remediation
- Fix · GHSA-m9p2-fxp5-v3fp diesel (crates.io) Fixed in 2.3.8 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-m9p2-fxp5-v3fp
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences