What’s Vulnerable › Vulnerabilities
CVE-2023-31136: PostgresNIO processes unencrypted bytes from man-in-the-middle
- Severity: medium (CVSS 5.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-05-09 · updated 2026-06-17
- Weakness: CWE-522
Description
PostgresNIO is a Swift client for PostgreSQL. Any user of PostgresNIO prior to version 1.14.2 connecting to servers with TLS enabled is vulnerable to a man-in-the-middle attacker injecting false responses to the client's first few queries, despite the use of TLS certificate verification and encryption. The vulnerability is addressed in PostgresNIO versions starting from 1.14.2. There are no known workarounds for unpatched users.
Affected products
- vapor Postgresnio: before 1.14.2 — fixed in 1.14.2
How to fix
Upgrade to a fixed version: vapor Postgresnio 1.14.2. Check the vendor advisory for mitigations.
References
- https://github.com/advisories/GHSA-467w-rrqc-395f
- https://github.com/advisories/GHSA-735f-7qx4-jqq5
- https://github.com/apple/swift-nio/pull/2419
- https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7
- https://github.com/vapor/postgres-nio/releases/tag/1.14.2
- https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv
- https://www.postgresql.org/support/security/CVE-2021-23214/
- https://www.postgresql.org/support/security/CVE-2021-23222/
- https://github.com/advisories/GHSA-467w-rrqc-395f
- https://github.com/advisories/GHSA-735f-7qx4-jqq5
- https://github.com/apple/swift-nio/pull/2419
- https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7
Get alerted when CVE-2023-31136 or the next vulnerability affects your stack