{"api_version":"1","generated_at":"2026-07-23T16:45:14+00:00","cve":"CVE-2023-31136","urls":{"html":"https://cve.report/CVE-2023-31136","api":"https://cve.report/api/cve/CVE-2023-31136.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-31136","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-31136"},"summary":{"title":"CVE-2023-31136","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-05-09 14:15:00","updated_at":"2023-05-16 16:43:00"},"problem_types":["CWE-522"],"metrics":[],"references":[{"url":"https://github.com/advisories/GHSA-467w-rrqc-395f","name":"https://github.com/advisories/GHSA-467w-rrqc-395f","refsource":"MISC","tags":[],"title":"When the server is configured to use trust authentication... · CVE-2021-23214 · GitHub Advisory Database · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.postgresql.org/support/security/CVE-2021-23214/","name":"https://www.postgresql.org/support/security/CVE-2021-23214/","refsource":"MISC","tags":[],"title":"PostgreSQL: CVE-2021-23214: Server processes unencrypted bytes from man-in-the-middle","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/advisories/GHSA-735f-7qx4-jqq5","name":"https://github.com/advisories/GHSA-735f-7qx4-jqq5","refsource":"MISC","tags":[],"title":"A man-in-the-middle attacker can inject false responses... · CVE-2021-23222 · GitHub Advisory Database · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv","name":"https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv","refsource":"MISC","tags":[],"title":"PostgresNIO processes unencrypted bytes from man-in-the-middle · Advisory · vapor/postgres-nio · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/vapor/postgres-nio/releases/tag/1.14.2","name":"https://github.com/vapor/postgres-nio/releases/tag/1.14.2","refsource":"MISC","tags":[],"title":"Release PostgresNIO 1.14.2 · vapor/postgres-nio · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.postgresql.org/support/security/CVE-2021-23222/","name":"https://www.postgresql.org/support/security/CVE-2021-23222/","refsource":"MISC","tags":[],"title":"PostgreSQL: CVE-2021-23222: libpq processes unencrypted bytes from man-in-the-middle","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7","name":"https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-9cfh-vx93-84vv · vapor/postgres-nio@2df54bc · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/apple/swift-nio/pull/2419","name":"https://github.com/apple/swift-nio/pull/2419","refsource":"MISC","tags":[],"title":"Add unprocessedBytes property on NIOSingleStepByteToMessageProcessor by fabianfett · Pull Request #2419 · apple/swift-nio · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-31136","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-31136","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"31136","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"vapor","cpe5":"postgresnio","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"postgresql","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-31136","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-522: Insufficiently Protected Credentials","cweId":"CWE-522"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"vapor","product":{"product_data":[{"product_name":"postgres-nio","version":{"version_data":[{"version_affected":"=","version_value":"< 1.14.2"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv","refsource":"MISC","name":"https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv"},{"url":"https://github.com/apple/swift-nio/pull/2419","refsource":"MISC","name":"https://github.com/apple/swift-nio/pull/2419"},{"url":"https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7","refsource":"MISC","name":"https://github.com/vapor/postgres-nio/commit/2df54bc94607f44584ae6ffa74e3cd754fffafc7"},{"url":"https://github.com/advisories/GHSA-467w-rrqc-395f","refsource":"MISC","name":"https://github.com/advisories/GHSA-467w-rrqc-395f"},{"url":"https://github.com/advisories/GHSA-735f-7qx4-jqq5","refsource":"MISC","name":"https://github.com/advisories/GHSA-735f-7qx4-jqq5"},{"url":"https://github.com/vapor/postgres-nio/releases/tag/1.14.2","refsource":"MISC","name":"https://github.com/vapor/postgres-nio/releases/tag/1.14.2"},{"url":"https://www.postgresql.org/support/security/CVE-2021-23214/","refsource":"MISC","name":"https://www.postgresql.org/support/security/CVE-2021-23214/"},{"url":"https://www.postgresql.org/support/security/CVE-2021-23222/","refsource":"MISC","name":"https://www.postgresql.org/support/security/CVE-2021-23222/"}]},"source":{"advisory":"GHSA-9cfh-vx93-84vv","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":3.7,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}]}},"nvd":{"publishedDate":"2023-05-09 14:15:00","lastModifiedDate":"2023-05-16 16:43:00","problem_types":["CWE-522"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"NONE","baseScore":5.9,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.2,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:vapor:postgresnio:*:*:*:*:*:postgresql:*:*","versionEndExcluding":"1.14.2","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}