CVE Vulnerabilities

CVE-2022-2625

Improperly Controlled Modification of Dynamically-Determined Object Attributes

Published: Aug 18, 2022 | Modified: Nov 21, 2024
CVSS 3.x
8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.1 MODERATE
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

A vulnerability was found in PostgreSQL. This attack requires permission to create non-temporary objects in at least one schema, the ability to lure or wait for an administrator to create or update an affected extension in that schema, and the 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, this flaw allows an attacker to run arbitrary code as the victim role, which may be a superuser.

Weakness

The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.

Affected Software

Name Vendor Start Version End Version
Postgresql Postgresql 10.0 (including) 10.22 (excluding)
Postgresql Postgresql 11.0 (including) 11.17 (excluding)
Postgresql Postgresql 12.0 (including) 12.12 (excluding)
Postgresql Postgresql 13.0 (including) 13.8 (excluding)
Postgresql Postgresql 14.0 (including) 14.5 (excluding)
Postgresql Postgresql 15-beta1 (including) 15-beta1 (including)
Postgresql Postgresql 15-beta2 (including) 15-beta2 (including)
Red Hat Enterprise Linux 8 RedHat postgresql:12-8060020221003080350.ad008a3a *
Red Hat Enterprise Linux 8 RedHat postgresql:10-8070020221124143148.bd1311ed *
Red Hat Enterprise Linux 8 RedHat postgresql:13-8070020230227142544.bd1311ed *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat postgresql:12-8020020231128165246.4cda2c84 *
Red Hat Enterprise Linux 8.2 Telecommunications Update Service RedHat postgresql:12-8020020231128165246.4cda2c84 *
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions RedHat postgresql:12-8020020231128165246.4cda2c84 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:12-8040020231127153301.522a0ee4 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:13-8040020231127154806.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:12-8040020231127153301.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:13-8040020231127154806.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:12-8040020231127153301.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:13-8040020231127154806.522a0ee4 *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat postgresql:13-8060020231114115246.ad008a3a *
Red Hat Enterprise Linux 9 RedHat postgresql-0:13.10-1.el9_1 *
Red Hat Enterprise Linux 9.0 Extended Update Support RedHat postgresql-0:13.13-1.el9_0 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-postgresql10-postgresql-0:10.23-1.el7 *
Postgresql-10 Ubuntu bionic *
Postgresql-10 Ubuntu upstream *
Postgresql-12 Ubuntu focal *
Postgresql-12 Ubuntu trusty *
Postgresql-12 Ubuntu upstream *
Postgresql-13 Ubuntu upstream *
Postgresql-14 Ubuntu jammy *
Postgresql-14 Ubuntu upstream *
Postgresql-9.1 Ubuntu trusty *
Postgresql-9.3 Ubuntu trusty *
Postgresql-9.3 Ubuntu trusty/esm *
Postgresql-9.5 Ubuntu esm-infra/xenial *
Postgresql-9.5 Ubuntu xenial *

Extended Description

If the object contains attributes that were only intended for internal use, then their unexpected modification could lead to a vulnerability. This weakness is sometimes known by the language-specific mechanisms that make it possible, such as mass assignment, autobinding, or object injection.

Potential Mitigations

  • If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists.
  • For applications written with Ruby on Rails, use the attr_accessible (allowlist) or attr_protected (denylist) macros in each class that may be used in mass assignment.

References