{"answers":{"affected":"1 open source package ship an affected version, including postgresql. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-0985 in the wild and no public exploit code.","fix":"Upgrade postgresql to a fixed version for your release line: 12.18.0, 13.14.0, 14.11.0 or 15.6.0.","what":"CVE-2024-0985 is a high-severity vulnerability in Postgresql Postgresql, published on 8 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-0985 and fix it if it is affected.\n\nWhat it is: CVE-2024-0985 is a high-severity vulnerability in Postgresql Postgresql, published on 8 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-0985 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- postgresql (Bitnami): affected from 12.0.0; fixed in 12.18.0, 13.14.0, 14.11.0, 15.6.0\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-2024-0985/ (Markdown: https://insights.sbomify.com/CVE-2024-0985/index.md)","id":"CVE-2024-0985","markdown":"https://insights.sbomify.com/CVE-2024-0985/index.md","name":"CVE-2024-0985","record":{"aliases":["ALPINE-CVE-2024-0985","ALSA-2024:0950","ALSA-2024:0951","ALSA-2024:0956","ALSA-2024:0973","ALSA-2024:0974","ALSA-2024:0975","AZL-34279","AZL-35111","BELL-CVE-2024-0985","BIT-postgresql-2024-0985","CLEANSTART-2026-FA69444","CLSA-2024-1711492417","DEBIAN-CVE-2024-0985","DLA-3764-1","DSA-5622-1","DSA-5623-1","ECHO-6ae2-fea4-43ea","GHSA-4828-5p9m-g4ff","JLSEC-2026-46","MGASA-2024-0043","RHSA-2024:0950","RHSA-2024:0951","RHSA-2024:0956","RHSA-2024:0973","RHSA-2024:0974","RHSA-2024:0975","RHSA-2024:0988","RHSA-2024:0990","RHSA-2024:0992","RHSA-2024:1017","RHSA-2024:1069","RHSA-2024:1070","RHSA-2024:1071","RHSA-2024:1195","RHSA-2024:1240","RHSA-2024:1241","RHSA-2024:1314","RHSA-2024:1315","RHSA-2024:1348","RHSA-2024:1422","RHSA-2024:1426","RHSA-2024:1428","RHSA-2024:1429","RHSA-2024:1437","RLSA-2024:0950","RLSA-2024:0951","RLSA-2024:0956","RLSA-2024:0973","RLSA-2024:0974","RLSA-2024:0975","SUSE-SU-2024:0520-1","SUSE-SU-2024:0522-1","SUSE-SU-2024:0523-1","SUSE-SU-2024:0540-1","SUSE-SU-2024:0541-1","SUSE-SU-2024:0542-1","SUSE-SU-2024:0546-1","SUSE-SU-2024:0550-1","SUSE-SU-2024:0551-1","SUSE-SU-2024:0552-1","UBUNTU-CVE-2024-0985","USN-6656-1","USN-6656-2","openSUSE-SU-2024:13669-1","openSUSE-SU-2024:13670-1","openSUSE-SU-2024:13671-1","openSUSE-SU-2024:13672-1"],"analysis":{"component_type":"database","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"PostgreSQL database","requires_auth":"low_privilege","summary":"An attacker can execute arbitrary SQL as a superuser by tricking them into refreshing a malicious materialized view concurrently.","user_interaction":"required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PostgreSQL","cpe":[{"product":"postgresql","vendor":"postgresql"}],"cvss":{"score":8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-271","name":"Privilege Dropping / Lowering Errors"}],"description":"Late privilege drop in REFRESH MATERIALIZED VIEW CONCURRENTLY in PostgreSQL allows an object creator to execute arbitrary SQL functions as the command issuer. The command intends to run SQL functions as the owner of the materialized view, enabling safe refresh of untrusted materialized views. The victim is a superuser or member of one of the attacker's roles. The attack requires luring the victim into running REFRESH MATERIALIZED VIEW CONCURRENTLY on the attacker's materialized view. Versions before PostgreSQL 16.2, 15.6, 14.11, 13.14, and 12.18 are affected.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Bitnami","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::crb","Red Hat:rhel_aus:8.2::appstream","Red Hat:rhel_aus:8.4::appstream","Red Hat:rhel_e4s:8.2::appstream","Red Hat:rhel_e4s:8.4::appstream","Red Hat:rhel_eus:8.6::appstream","Red Hat:rhel_eus:8.8::appstream","Red Hat:rhel_eus:9.0::appstream","Red Hat:rhel_eus:9.0::crb","Red Hat:rhel_eus:9.2::appstream","Red Hat:rhel_eus:9.2::crb","Red Hat:rhel_software_collections:3::el7","Red Hat:rhel_tus:8.2::appstream","Red Hat:rhel_tus:8.4::appstream","Rocky Linux:8","Rocky Linux:9","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Module for Basesystem 15 SP5","SUSE:Linux Enterprise Module for Legacy 15 SP5","SUSE:Linux Enterprise Module for Package Hub 15 SP5","SUSE:Linux Enterprise Module for Server Applications 15 SP5","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP2-LTSS","SUSE:Linux Enterprise Server 15 SP3-LTSS","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP2","SUSE:Linux Enterprise Server for SAP Applications 15 SP3","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","SUSE:Linux Enterprise Software Development Kit 12 SP5","SUSE:Manager Proxy 4.3","SUSE:Manager Server 4.3","openSUSE:Leap 15.5","openSUSE:Tumbleweed"],"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":"PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL","id":"CVE-2024-0985","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"postgresql:postgresql","products":["postgresql:postgresql"],"type":"privilege_escalation","year":"2024"},"n_packages":1234,"n_references":3,"next":{"headline":"Issabel PBX Asterisk-Cli os command injection","id":"CVE-2024-0986"},"packages":[{"ecosystem":"Bitnami","fixed":["12.18.0","13.14.0","14.11.0","15.6.0"],"introduced":["12.0.0","13.0.0","14.0.0","15.0.0"],"last_affected":[],"package":"postgresql","purl":"pkg:bitnami/postgresql","source":"BIT-postgresql-2024-0985"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.6-3.module_el8.6.0+2758+4f4474df"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.6-3.module_el8.6.0+2760+1746ec94"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.6-3.module_el8.6.0+3094+eb237fb8"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.6-3.module_el8.6.0+3095+ee60d910"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.6-3.module_el8.9.0+3704+f1f917ce"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.8-1.module_el8.8.0+3487+43ec1b9f"],"introduced":["0"],"last_affected":[],"package":"pg_repack","purl":"pkg:rpm/almalinux/pg_repack","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"pgaudit","purl":"pkg:rpm/almalinux/pgaudit","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["1.5.0-1.module_el8.6.0+2760+1746ec94"],"introduced":["0"],"last_affected":[],"package":"pgaudit","purl":"pkg:rpm/almalinux/pgaudit","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["1.5.0-1.module_el8.6.0+3095+ee60d910"],"introduced":["0"],"last_affected":[],"package":"pgaudit","purl":"pkg:rpm/almalinux/pgaudit","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["1.7.0-1.module_el8.8.0+3487+43ec1b9f"],"introduced":["0"],"last_affected":[],"package":"pgaudit","purl":"pkg:rpm/almalinux/pgaudit","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.0-2.module_el8.6.0+2758+4f4474df"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.0-2.module_el8.6.0+2760+1746ec94"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.0-2.module_el8.6.0+3094+eb237fb8"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.0-2.module_el8.6.0+3095+ee60d910"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.0-2.module_el8.9.0+3704+f1f917ce"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f"],"introduced":["0"],"last_affected":[],"package":"postgres-decoderbufs","purl":"pkg:rpm/almalinux/postgres-decoderbufs","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql","purl":"pkg:rpm/almalinux/postgresql","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql","purl":"pkg:rpm/almalinux/postgresql","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql","purl":"pkg:rpm/almalinux/postgresql","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["15.6-1.module_el8.9.0+3739+514705ed.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql","purl":"pkg:rpm/almalinux/postgresql","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-contrib","purl":"pkg:rpm/almalinux/postgresql-contrib","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-contrib","purl":"pkg:rpm/almalinux/postgresql-contrib","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-contrib","purl":"pkg:rpm/almalinux/postgresql-contrib","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["15.6-1.module_el8.9.0+3739+514705ed.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-contrib","purl":"pkg:rpm/almalinux/postgresql-contrib","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-docs","purl":"pkg:rpm/almalinux/postgresql-docs","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-docs","purl":"pkg:rpm/almalinux/postgresql-docs","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-docs","purl":"pkg:rpm/almalinux/postgresql-docs","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["15.6-1.module_el8.9.0+3739+514705ed.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-docs","purl":"pkg:rpm/almalinux/postgresql-docs","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plperl","purl":"pkg:rpm/almalinux/postgresql-plperl","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plperl","purl":"pkg:rpm/almalinux/postgresql-plperl","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plperl","purl":"pkg:rpm/almalinux/postgresql-plperl","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["15.6-1.module_el8.9.0+3739+514705ed.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plperl","purl":"pkg:rpm/almalinux/postgresql-plperl","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plpython3","purl":"pkg:rpm/almalinux/postgresql-plpython3","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plpython3","purl":"pkg:rpm/almalinux/postgresql-plpython3","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plpython3","purl":"pkg:rpm/almalinux/postgresql-plpython3","source":"ALSA-2024:0975"},{"ecosystem":"AlmaLinux:8","fixed":["15.6-1.module_el8.9.0+3739+514705ed.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-plpython3","purl":"pkg:rpm/almalinux/postgresql-plpython3","source":"ALSA-2024:0973"},{"ecosystem":"AlmaLinux:8","fixed":["10.23-4.module_el8.9.0+3736+952d0ed7.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-pltcl","purl":"pkg:rpm/almalinux/postgresql-pltcl","source":"ALSA-2024:0956"},{"ecosystem":"AlmaLinux:8","fixed":["12.18-1.module_el8.9.0+3740+0e74851f.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-pltcl","purl":"pkg:rpm/almalinux/postgresql-pltcl","source":"ALSA-2024:0974"},{"ecosystem":"AlmaLinux:8","fixed":["13.14-1.module_el8.9.0+3738+d55e2165.alma.1"],"introduced":["0"],"last_affected":[],"package":"postgresql-pltcl","purl":"pkg:rpm/almalinux/postgresql-pltcl","source":"ALSA-2024:0975"}],"prev":{"headline":"ImageRecycle pdf \u0026 image compression \u003c= 3.1.13 - Missing Authorization to Settings Update in disableOptimization","id":"CVE-2024-0984"},"products":["PostgreSQL"],"published":"2024-02-08","related":[{"cvss_score":10,"headline":"Information disclosure in n/a","id":"CVE-2013-1902","kev_date_added":null,"published":"2013-04-04"},{"cvss_score":10,"headline":"Information disclosure in n/a","id":"CVE-2013-1903","kev_date_added":null,"published":"2013-04-04"},{"cvss_score":10,"headline":"Privilege escalation in n/a","id":"CVE-2007-3279","kev_date_added":null,"published":"2007-06-19"},{"cvss_score":10,"headline":"Integer overflow in n/a","id":"CVE-2002-1399","kev_date_added":null,"published":"2003-01-08"},{"cvss_score":9.1,"headline":"Information disclosure in n/a","id":"CVE-2016-3065","kev_date_added":null,"published":"2016-04-11"},{"cvss_score":9,"headline":"Code injection in n/a","id":"CVE-2007-3280","kev_date_added":null,"published":"2007-06-19"},{"cvss_score":8.8,"headline":"PostgreSQL tsvector and tsquery undersize allocations, via integer wraparound","id":"CVE-2026-14662","kev_date_added":null,"published":"2026-08-13"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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":"total"},"state":"PUBLISHED","updated":"2025-06-13","vendors":["n/a"]},"summary":"An attacker can execute arbitrary SQL as a superuser by tricking them into refreshing a malicious materialized view concurrently.","url":"https://insights.sbomify.com/CVE-2024-0985/"}