{"id":"UBUNTU-CVE-2026-16238","details":"Type confusion in PostgreSQL pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirange values.  Within major version 18, minor versions before PostgreSQL 18.6 are affected.  Versions before PostgreSQL 18 are unaffected.","modified":"2026-09-02T19:39:46.046758447Z","published":"2026-08-13T13:17:00Z","related":["USN-8653-1"],"upstream":["CVE-2026-16238"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-16238"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-16238"},{"type":"REPORT","url":"https://www.postgresql.org/support/security/CVE-2026-16238/"},{"type":"REPORT","url":"https://www.postgresql.org/about/news/postgresql-186-1711-1615-1519-1424-and-19-beta-3-released-3365/"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-8653-1"}],"affected":[{"package":{"name":"postgresql-9.3","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/postgresql-9.3?arch=source&distro=esm-infra-legacy%2Ftrusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.3.1-1","9.3.2-1","9.3.2-1ubuntu1","9.3.2-1ubuntu2","9.3.3-1","9.3.3-1bzr1","9.3.3-1bzr2","9.3.4-1","9.3.5-0ubuntu0.14.04.1","9.3.6-0ubuntu0.14.04","9.3.7-0ubuntu0.14.04","9.3.8-0ubuntu0.4.04","9.3.9-0ubuntu0.14.04","9.3.10-0ubuntu0.14.04","9.3.11-0ubuntu0.14.04","9.3.12-0ubuntu0.14.04","9.3.13-0ubuntu0.14.04","9.3.14-0ubuntu0.14.04","9.3.15-0ubuntu0.14.04","9.3.16-0ubuntu0.14.04","9.3.17-0ubuntu0.14.04","9.3.18-0ubuntu0.14.04.1","9.3.19-0ubuntu0.14.04","9.3.20-0ubuntu0.14.04","9.3.21-0ubuntu0.14.04","9.3.22-0ubuntu0.14.04","9.3.23-0ubuntu0.14.04","9.3.24-0ubuntu0.14.04","9.3.24-0ubuntu0.14.04+esm1"],"ecosystem_specific":{"binaries":[{"binary_name":"libecpg-compat3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_version":"9.3.24-0ubuntu0.14.04+esm1","binary_name":"libecpg6"},{"binary_name":"libpgtypes3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_version":"9.3.24-0ubuntu0.14.04+esm1","binary_name":"libpq5"},{"binary_version":"9.3.24-0ubuntu0.14.04+esm1","binary_name":"postgresql-9.3"},{"binary_name":"postgresql-client-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_name":"postgresql-contrib-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_name":"postgresql-doc-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_name":"postgresql-plperl-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_name":"postgresql-plpython-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_name":"postgresql-plpython3-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"},{"binary_version":"9.3.24-0ubuntu0.14.04+esm1","binary_name":"postgresql-pltcl-9.3"},{"binary_name":"postgresql-server-dev-9.3","binary_version":"9.3.24-0ubuntu0.14.04+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-16238.json"}},{"package":{"name":"postgresql-18","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/postgresql-18?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"18.6-0ubuntu0.26.04.1"}]}],"versions":["18.0-1","18.1-1","18.1-1ubuntu1","18.1-1ubuntu2","18.1-2","18.3-1","18.4-0ubuntu0.26.04.1"],"ecosystem_specific":{"binaries":[{"binary_name":"libecpg-compat3","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"libecpg6","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"libpgtypes3","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"libpq-oauth","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"libpq5","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"postgresql-18","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"postgresql-18-jit","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"postgresql-client-18","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_version":"18.6-0ubuntu0.26.04.1","binary_name":"postgresql-doc-18"},{"binary_version":"18.6-0ubuntu0.26.04.1","binary_name":"postgresql-plperl-18"},{"binary_name":"postgresql-plpython3-18","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_name":"postgresql-pltcl-18","binary_version":"18.6-0ubuntu0.26.04.1"},{"binary_version":"18.6-0ubuntu0.26.04.1","binary_name":"postgresql-server-dev-18"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-16238.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}