GitHub Advisoryadvisory · crates.io
GHSA-3gjw-f78c-vvpw tokio-postgres: Panic on a `DataRow` with fewer fields than columns allows denial of service
MEDIUM
Official page ↗
- Ecosystem
- crates.io
- Packages
- tokio-postgres
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- Weaknesses
- CWE-125
- Reviewed
- 2026-08-24
Affected packages
• crates.io tokio-postgres: >= 0.4.0, < 0.7.18 → fixed in 0.7.18
Description
A malicious or compromised server can send a row containing fewer fields than
its row description declares columns. Reading one of the missing columns then
panics with an out-of-bounds index, aborting the calling task. This affects even
the otherwise non-panicking `try_get`, and both `Row` and `SimpleQueryRow`.
Applications that connect only to a trusted database are not exposed; the risk
applies to clients that may connect to untrusted or user-supplied servers, or
whose connection can be intercepted by a man-in-the-middle.
Related
Weakness · CWE (1)
- CWE-125 Out-of-bounds Read weakness