postgres-protocol: Unbounded SCRAM iteration count allows a malicious server to cause CPU-exhaustion denial of serviceGHSA-5x78-73v4-xg6w
Fix: rust-postgres/rust-postgres@d40097aGHSA-5x78-73v4-xg6w is a security vulnerability in postgres-protocol. A fix is available for postgres-protocol — see the affected versions and patch details below.
Real-World Exposure
postgres-protocolReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
A malicious, compromised, or man-in-the-middle server can supply an arbitrarily
large SCRAM-SHA-256 PBKDF2 iteration count during authentication. The client
runs it inline with no upper bound, pinning a tokio worker thread for minutes
per connection, possibly stalling the whole async runtime.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | postgres-protocol | ≥ 0.3.0&&< 0.6.12 | 0.6.12cargo update -p postgres-protocol --precise 0.6.12 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for postgres-protocol, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update postgres-protocol to 0.6.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5x78-73v4-xg6w is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-5x78-73v4-xg6w in your dependencies?
Find it across crates.io, including transitive dependencies.