{"answers":{"affected":"4 open source packages ship an affected version, including libpq and pg-native. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-25852 in the wild and no public exploit code.","fix":"Upgrade libpq to 1.8.10 or later.","what":"CVE-2022-25852 is a high-severity denial of service vulnerability in libpq, published on 17 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-25852 and fix it if it is affected.\n\nWhat it is: CVE-2022-25852 is a high-severity denial of service vulnerability in libpq, published on 17 Jun 2022. 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-2022-25852 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpq (npm): affected all versions; fixed in 1.8.10\n- libpq (npm): affected all versions; fixed in 1.8.10\n- pg-native (npm): affected all versions; fixed in 3.0.1\n- pg-native (npm): affected all versions; fixed in 3.0.1\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-2022-25852/ (Markdown: https://insights.sbomify.com/CVE-2022-25852/index.md)","id":"CVE-2022-25852","markdown":"https://insights.sbomify.com/CVE-2022-25852/index.md","name":"CVE-2022-25852","record":{"aliases":["GHSA-j32j-2hxv-rqf7"],"analysis":{"component_type":"library","fix_type":"no_fix_stated","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"PostgreSQL native bindings","requires_auth":"none","summary":"Attackers can cause a denial of service in pg-native and libpq by passing non-array arguments that trigger casting failures.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[{"product":"libpq","vendor":"libpq_project"},{"product":"pg-native","vendor":"pg-native_project"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P","version":"3.1"},"cwes":[{"id":"CWE-704","name":"Incorrect Type Conversion or Cast"}],"description":"All versions of package pg-native; all versions of package libpq are vulnerable to Denial of Service (DoS) when the addons attempt to cast the second argument to an array and fail. This happens for every non-array argument passed. **Note:** pg-native is a mere binding to npm's libpq library, which in turn has the addons and bindings to the actual C libpq library. This means that problems found in pg-native may transitively impact npm's libpq.","ecosystems":["npm"],"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":"Denial of Service (DoS)","id":"CVE-2022-25852","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":4,"n_references":2,"next":{"headline":"semver-tags is vulnerable to Command Injection via the getGitTagsRemote function","id":"CVE-2022-25853"},"packages":[{"ecosystem":"npm","fixed":["1.8.10"],"introduced":["0"],"last_affected":[],"package":"libpq","purl":null,"source":"GHSA-j32j-2hxv-rqf7"},{"ecosystem":"npm","fixed":["1.8.10"],"introduced":["0"],"last_affected":[],"package":"libpq","purl":"pkg:npm/libpq","source":"GHSA-j32j-2hxv-rqf7"},{"ecosystem":"npm","fixed":["3.0.1"],"introduced":["0"],"last_affected":[],"package":"pg-native","purl":null,"source":"GHSA-j32j-2hxv-rqf7"},{"ecosystem":"npm","fixed":["3.0.1"],"introduced":["0"],"last_affected":[],"package":"pg-native","purl":"pkg:npm/pg-native","source":"GHSA-j32j-2hxv-rqf7"}],"prev":{"headline":"Denial of Service (DoS)","id":"CVE-2022-25851"},"products":["libpq","pg-native"],"published":"2022-06-17","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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-09-17","vendors":["n/a"]},"summary":"Attackers can cause a denial of service in pg-native and libpq by passing non-array arguments that trigger casting failures.","url":"https://insights.sbomify.com/CVE-2022-25852/"}