{"id":"CVE-2022-2625","year":2022,"sequence":2625,"component":"core server","score":7.1,"cvss_version":"3.0","vector":"AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","first_published":"2022-08-11","source_url":"https://www.postgresql.org/support/security/CVE-2022-2625/","facts":{"affected":{"10":"10","11":"11","12":"12","13":"13","14":"14"},"component":"core server","cvss_version":"3.0","description_en":"Some extensions use CREATE OR REPLACE or CREATE IF NOT EXISTS commands. Some don't adhere to the documented rule to target only objects known to be extension members already. An attack requires permission to create non-temporary objects in at least one schema, ability to lure or wait for an administrator to create or update an affected extension in that schema, and ability to lure or wait for a victim to use the object targeted in CREATE OR REPLACE or CREATE IF NOT EXISTS . Given all three prerequisites, the attacker can run arbitrary code as the victim role, which may be a superuser. Known-affected extensions include both PostgreSQL-bundled and non-bundled extensions. PostgreSQL is blocking this attack in the core server, so there's no need to modify individual extensions.\n\nThe PostgreSQL project thanks Sven Klemm for reporting this problem.","first_published":"2022-08-11","fixed":{"10":"10.22","11":"11.17","12":"12.12","13":"13.8","14":"14.5"},"id":"CVE-2022-2625","introduced":{},"published":{"10":"2022-08-11","11":"2022-08-11","12":"2022-08-11","13":"2022-08-11","14":"2022-08-11"},"score":7.1,"title":"Extension scripts replace objects not belonging to the extension","url":"https://www.postgresql.org/support/security/CVE-2022-2625/","vector":"AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"},"reviewed_hash":"6a65a7884245936f6adaef8709d290d460e999dfce1ad78734fa7c9a324ed325","source_hash":"965b9e2323feab543f3cbeb74c418c3a5b43cbefc6594d2862ff0d24dcf8e6a2","text":{"locale":"zh-Hans","title":"扩展脚本会替换不属于该扩展的对象","description":"扩展脚本会替换不属于该扩展的对象","details":null,"format":"markdown","provenance":{"identity":"immutable_cve_code","sources":[{"observed_at":"2026-10-03 12:08:35.169032+08","raw":{"component":"core server","cve":"2022-2625","cvenumber":202202625,"description":"扩展脚本会替换不属于该扩展的对象","details":null,"detailslink":"https://access.redhat.com/security/cve/CVE-2022-2625","id":28,"legacyscore":"","newspost_id":null,"public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"},"source":"center","source_id":28,"source_table_sha256":"b57ee28b2263464208af0ccf7512b31f0c1ab7140d12dda09a0c87de341f1372"},{"observed_at":"2026-10-03 12:08:55.967155+08","raw":{"component":"core server","cve":"2022-2625","cvenumber":202202625,"description":"扩展脚本会替换不属于该扩展的对象","details":null,"detailslink":"https://access.redhat.com/security/cve/CVE-2022-2625","id":28,"legacyscore":"","newspost_id":null,"public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"},"source":"pgweb","source_id":28,"source_table_sha256":"b57ee28b2263464208af0ccf7512b31f0c1ab7140d12dda09a0c87de341f1372"}]},"text_hash":"6d543992a14b980da1527348697ab5247a38677d2131a59c3095b035eedfe9cc"},"locales":["en","zh-Hans"],"fixes":[{"major":"10","fixed_version":"10.22","introduced":null,"published_date":"2022-08-11","facts":{"fixed":"10.22","introduced":null,"published":"2022-08-11"}},{"major":"11","fixed_version":"11.17","introduced":null,"published_date":"2022-08-11","facts":{"fixed":"11.17","introduced":null,"published":"2022-08-11"}},{"major":"12","fixed_version":"12.12","introduced":null,"published_date":"2022-08-11","facts":{"fixed":"12.12","introduced":null,"published":"2022-08-11"}},{"major":"13","fixed_version":"13.8","introduced":null,"published_date":"2022-08-11","facts":{"fixed":"13.8","introduced":null,"published":"2022-08-11"}},{"major":"14","fixed_version":"14.5","introduced":null,"published_date":"2022-08-11","facts":{"fixed":"14.5","introduced":null,"published":"2022-08-11"}}],"legacy":[{"source":"center","source_id":28,"observed_at":"2026-10-03 12:08:35.169032+08","raw":{"id":28,"cve":"2022-2625","public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","details":null,"component":"core server","cvenumber":202202625,"description":"扩展脚本会替换不属于该扩展的对象","detailslink":"https://access.redhat.com/security/cve/CVE-2022-2625","legacyscore":"","newspost_id":null},"fixes":[{"source_id":95,"source_version_id":27,"major":"14","fixed_minor":5,"raw":{"id":95,"patch_id":28,"version_id":27,"fixed_minor":5},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]},{"source":"pgweb","source_id":28,"observed_at":"2026-10-03 12:08:55.967155+08","raw":{"id":28,"cve":"2022-2625","public":true,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","details":null,"component":"core server","cvenumber":202202625,"description":"扩展脚本会替换不属于该扩展的对象","detailslink":"https://access.redhat.com/security/cve/CVE-2022-2625","legacyscore":"","newspost_id":null},"fixes":[{"source_id":95,"source_version_id":27,"major":"14","fixed_minor":5,"raw":{"id":95,"patch_id":28,"version_id":27,"fixed_minor":5},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]}]}
