GHSA-3gjw-f78c-vvpw: tokio-postgres Denial of Service Vulnerability
MODERATEGHSA-3gjw-f78c-vvpw is a MODERATE denial of service vulnerability (CWE-125: Out-of-bounds Read) affecting tokio-postgres libraries in the crates.io ecosystem. The issue involves panic on a `datarow` with fewer fields than columns allows denial of service. Remediation is available by upgrading affected packages to version 0.7.18.
GHSA-3gjw-f78c-vvpw at a Glance
How to Fix GHSA-3gjw-f78c-vvpw
To remediate this vulnerability, upgrade all affected tokio-postgres dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade tokio-postgres to 0.7.18
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for tokio-postgres
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3gjw-f78c-vvpw, inspect your project dependencies for tokio-postgres:
inspect dependencies for tokio-postgres
Analyze the terminal output to locate any version of tokio-postgres in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.18), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In tokio-postgres, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3gjw-f78c-vvpw Affected tokio-postgres Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tokio-postgres
|
crates.io |
≥ 0.4.0
< 0.7.18
|
0.7.18
|
References
Frequently Asked Questions
What is GHSA-3gjw-f78c-vvpw?
Which tokio-postgres versions are affected?
What version fixes GHSA-3gjw-f78c-vvpw?
Is tokio-postgres affected?
What CWE is associated with GHSA-3gjw-f78c-vvpw?
How can I check crates.io dependencies for GHSA-3gjw-f78c-vvpw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3gjw-f78c-vvpw",
"modified" : "2026-08-24T19:49:17Z",
"published" : "2026-08-24T19:49:17Z",
"aliases" : [ ],
"summary" : "tokio-postgres: Panic on a `DataRow` with fewer fields than columns allows denial of service",
"details" : "A malicious or compromised server can send a row containing fewer fields than\nits row description declares columns. Reading one of the missing columns then\npanics with an out-of-bounds index, aborting the calling task. This affects even\nthe otherwise non-panicking `try_get`, and both `Row` and `SimpleQueryRow`.\n\nApplications that connect only to a trusted database are not exposed; the risk\napplies to clients that may connect to untrusted or user-supplied servers, or\nwhose connection can be intercepted by a man-in-the-middle.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "tokio-postgres"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.0"
}, {
"fixed" : "0.7.18"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-postgres/rust-postgres/commit/7a00ffa9ad4d951ec0a4564b52f1780fa9d353c1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-postgres/rust-postgres"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-postgres/rust-postgres/releases/tag/tokio-postgres-v0.7.18"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0178.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-24T19:49:17Z",
"nvd_published_at" : null
}
}