CVE Vulnerabilities

CVE-2022-2625

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Published: Aug 18, 2022 | Modified: Dec 02, 2022
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 attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.

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.5 Ubuntu esm-infra/xenial *
Postgresql-9.5 Ubuntu xenial *

Extended Description

By adding or modifying attributes of an object prototype, it is possible to create attributes that exist on every object, or replace critical attributes with malicious ones. This can be problematic if the product depends on existence or non-existence of certain attributes, or uses pre-defined attributes of object prototype (such as hasOwnProperty, toString or valueOf). This weakness is usually exploited by using a special attribute of objects called proto, constructor or prototype. Such attributes give access to the object prototype. This weakness is often found in code that assigns object attributes based on user input, or merges or clones objects recursively.

Potential Mitigations

References