{"answers":{"affected":"It affects 3 products.","exploited":"There is no known exploitation of CVE-2018-16850 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2018-16850 is a high-severity SQL injection vulnerability in Canonical Ubuntu Linux, published on 13 Nov 2018. 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-2018-16850 and fix it if it is affected.\n\nWhat it is: CVE-2018-16850 is a high-severity SQL injection vulnerability in Canonical Ubuntu Linux, published on 13 Nov 2018. 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-2018-16850 in the wild and no public exploit code.\n\nAffected product: Canonical Ubuntu Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-2018-16850/ (Markdown: https://insights.sbomify.com/CVE-2018-16850/index.md)","id":"CVE-2018-16850","markdown":"https://insights.sbomify.com/CVE-2018-16850/index.md","name":"CVE-2018-16850","record":{"aliases":["ALPINE-CVE-2018-16850","CLEANSTART-2026-QP57180","GHSA-h6p9-49w4-8mm8","RHSA-2018:3757","SUSE-SU-2018:3770-1","SUSE-SU-2018:3770-2","SUSE-SU-2018:3942-1","UBUNTU-CVE-2018-16850","USN-3818-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 statements with superuser privileges via crafted trigger definitions in pg_upgrade and pg_dump.","user_interaction":"required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"ubuntu_linux","vendor":"canonical"},{"product":"postgresql","vendor":"postgresql"},{"product":"enterprise_linux","vendor":"redhat"}],"cvss":{"score":8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"description":"postgresql before versions 11.1, 10.6 is vulnerable to a to SQL injection in pg_upgrade and pg_dump via CREATE TRIGGER ... REFERENCING. Using a purpose-crafted trigger definition, an attacker can cause arbitrary SQL statements to run, with superuser privileges.","ecosystems":["Red Hat:rhel_software_collections:3::el7","SUSE:Linux Enterprise Desktop 12 SP3","SUSE:Linux Enterprise Desktop 12 SP4","SUSE:Linux Enterprise Module for Basesystem 15","SUSE:Linux Enterprise Module for Package Hub 15","SUSE:Linux Enterprise Module for Server Applications 15","SUSE:Linux Enterprise Server 12 SP3","SUSE:Linux Enterprise Server 12 SP4","SUSE:Linux Enterprise Server for SAP Applications 12 SP3","SUSE:Linux Enterprise Server for SAP Applications 12 SP4","SUSE:Linux Enterprise Software Development Kit 12 SP3","SUSE:Linux Enterprise Software Development Kit 12 SP4"],"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":"SQL injection in postgresql","id":"CVE-2018-16850","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"canonical:ubuntu_linux","products":["canonical:ubuntu_linux","postgresql:postgresql","redhat:enterprise_linux"],"type":"sql_injection","year":"2018"},"n_packages":32,"n_references":7,"next":{"headline":"Null dereference in samba","id":"CVE-2018-16851"},"packages":[{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-contrib","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-contrib","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-contrib-syspaths","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-contrib-syspaths","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-debuginfo","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-debuginfo","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-devel","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-devel","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-docs","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-docs","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-libs","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-libs","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-plperl","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-plperl","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-plpython","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-plpython","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-pltcl","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-pltcl","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-server","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-server","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-server-syspaths","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-server-syspaths","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-static","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-static","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-syspaths","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-syspaths","source":"RHSA-2018:3757"},{"ecosystem":"Red Hat:rhel_software_collections:3::el7","fixed":["0:10.6-1.el7"],"introduced":["0"],"last_affected":[],"package":"rh-postgresql10-postgresql-test","purl":"pkg:rpm/redhat/rh-postgresql10-postgresql-test","source":"RHSA-2018:3757"},{"ecosystem":"SUSE:Linux Enterprise Desktop 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Desktop 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Desktop 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Desktop 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15","fixed":["10.6-4.8.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015","source":"SUSE-SU-2018:3942-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15","fixed":["10.6-4.8.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015","source":"SUSE-SU-2018:3942-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Server Applications 15","fixed":["10.6-4.8.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015","source":"SUSE-SU-2018:3942-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10","purl":"pkg:rpm/suse/postgresql10\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4","source":"SUSE-SU-2018:3770-2"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP3","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3","source":"SUSE-SU-2018:3770-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP4","fixed":["10.6-1.6.1"],"introduced":["0"],"last_affected":[],"package":"postgresql10-libs","purl":"pkg:rpm/suse/postgresql10-libs\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP4","source":"SUSE-SU-2018:3770-2"}],"prev":{"headline":"openstack-mistral Discloses the presence of arbitrary files within the filesystem","id":"CVE-2018-16849"},"products":["postgresql"],"published":"2018-11-13","related":[{"cvss_score":9.8,"headline":"SaltStack Salt Authentication Bypass","id":"CVE-2020-11651","kev_date_added":"2021-11-03","published":"2020-04-30"},{"cvss_score":9.8,"headline":"OpenSMTPD Remote Code Execution","id":"CVE-2020-7247","kev_date_added":"2022-03-25","published":"2020-01-29"},{"cvss_score":9.8,"headline":"Exim Out-of-bounds Write","id":"CVE-2019-16928","kev_date_added":"2022-03-03","published":"2019-09-27"},{"cvss_score":9.8,"headline":"Exim Buffer Overflow","id":"CVE-2018-6789","kev_date_added":"2021-11-03","published":"2018-02-08"},{"cvss_score":9.8,"headline":"Oracle Java SE and Java SE Embedded Remote Code Execution","id":"CVE-2015-2590","kev_date_added":"2022-03-03","published":"2015-07-16"},{"cvss_score":9.8,"headline":"Oracle JRE Remote Code Execution","id":"CVE-2013-0422","kev_date_added":"2022-05-25","published":"2013-01-10"},{"cvss_score":9.8,"headline":"Oracle Java SE Runtime Environment (JRE) Arbitrary Code Execution","id":"CVE-2011-3544","kev_date_added":"2022-03-03","published":"2011-10-19"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"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-08-05","vendors":["The PostgreSQL Project"]},"summary":"An attacker can execute arbitrary SQL statements with superuser privileges via crafted trigger definitions in pg_upgrade and pg_dump.","url":"https://insights.sbomify.com/CVE-2018-16850/"}