{"answers":{"affected":"2 open source packages ship an affected version, including github.com/vapor/postgres-nio. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-31136 in the wild and no public exploit code.","fix":"Upgrade github.com/vapor/postgres-nio to 1.14.2 or later.","what":"CVE-2023-31136 is a low-severity vulnerability in vapor postgres-nio, published on 9 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-31136 and fix it if it is affected.\n\nWhat it is: CVE-2023-31136 is a low-severity vulnerability in vapor postgres-nio, published on 9 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-31136 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/vapor/postgres-nio (SwiftURL): affected all versions; fixed in 1.14.2\n- github.com/vapor/postgres-nio (SwiftURL): affected all versions; fixed in 1.14.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-31136/ (Markdown: https://insights.sbomify.com/CVE-2023-31136/index.md)","id":"CVE-2023-31136","markdown":"https://insights.sbomify.com/CVE-2023-31136/index.md","name":"CVE-2023-31136","record":{"aliases":["GHSA-9cfh-vx93-84vv"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Swift PostgreSQL client","requires_auth":"none","summary":"A man-in-the-middle attacker can inject false responses to initial queries in PostgresNIO despite TLS encryption, compromising data integrity.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"postgresnio","vendor":"vapor"}],"cvss":{"score":3.7,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-522","name":"Insufficiently Protected Credentials"}],"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.","ecosystems":["SwiftURL"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"PostgresNIO processes unencrypted bytes from man-in-the-middle","id":"CVE-2023-31136","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"SwiftURL","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":2,"n_references":8,"next":{"headline":"MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression","id":"CVE-2023-31137"},"packages":[{"ecosystem":"SwiftURL","fixed":["1.14.2"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/postgres-nio","purl":null,"source":"GHSA-9cfh-vx93-84vv"},{"ecosystem":"SwiftURL","fixed":["1.14.2"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/postgres-nio","purl":"pkg:swift/github.com/vapor/postgres-nio","source":"GHSA-9cfh-vx93-84vv"}],"prev":{"headline":"Dgraph Audit Log Encryption nonce reuse","id":"CVE-2023-31135"},"products":["postgres-nio"],"published":"2023-05-09","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-28","vendors":["vapor"]},"summary":"A man-in-the-middle attacker can inject false responses to initial queries in PostgresNIO despite TLS encryption, compromising data integrity.","url":"https://insights.sbomify.com/CVE-2023-31136/"}