CVE Vulnerabilities

CVE-2020-7788

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

Published: Dec 11, 2020 | Modified: Dec 02, 2022
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
7.3 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Ubuntu
MEDIUM

This affects the package ini before 1.3.6. If an attacker submits a malicious INI file to an application that parses it with ini.parse, they will pollute the prototype on the application. This can be exploited further depending on the context.

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
Ini Ini_project * 1.3.6 (excluding)
Node-ini Ubuntu bionic *
Node-ini Ubuntu devel *
Node-ini Ubuntu esm-apps/bionic *
Node-ini Ubuntu esm-apps/focal *
Node-ini Ubuntu esm-apps/jammy *
Node-ini Ubuntu esm-apps/noble *
Node-ini Ubuntu esm-apps/xenial *
Node-ini Ubuntu esm-infra-legacy/trusty *
Node-ini Ubuntu focal *
Node-ini Ubuntu groovy *
Node-ini Ubuntu hirsute *
Node-ini Ubuntu impish *
Node-ini Ubuntu jammy *
Node-ini Ubuntu kinetic *
Node-ini Ubuntu lunar *
Node-ini Ubuntu mantic *
Node-ini Ubuntu noble *
Node-ini Ubuntu oracular *
Node-ini Ubuntu trusty *
Node-ini Ubuntu trusty/esm *
Node-ini Ubuntu xenial *
Red Hat Enterprise Linux 8 RedHat nodejs:10-8030020210118191659.229f0a1c *
Red Hat Enterprise Linux 8 RedHat nodejs:12-8030020210129141730.229f0a1c *
Red Hat Enterprise Linux 8 RedHat nodejs:14-8030020210126165503.229f0a1c *
Red Hat Enterprise Linux 8 RedHat nodejs:16-8050020211206113934.c5368500 *
Red Hat Enterprise Linux 8 RedHat nodejs:14-8050020211213115342.c5368500 *
Red Hat Enterprise Linux 8.4 Extended Update Support RedHat nodejs:14-8040020211213111158.522a0ee4 *
Red Hat Enterprise Linux 9 RedHat nodejs-nodemon-0:2.0.19-1.el9_0 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs14-nodejs-0:14.15.4-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs12-nodejs-0:12.20.1-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs12-nodejs-nodemon-0:2.0.3-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs10-nodejs-0:10.23.1-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs14-nodejs-nodemon-0:2.0.3-5.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs12-nodejs-0:12.22.5-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-nodejs12-nodejs-nodemon-0:2.0.3-5.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-nodejs14-nodejs-0:14.15.4-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-nodejs12-nodejs-0:12.20.1-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-nodejs12-nodejs-nodemon-0:2.0.3-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-nodejs10-nodejs-0:10.23.1-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs14-nodejs-0:14.15.4-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs12-nodejs-0:12.20.1-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs12-nodejs-nodemon-0:2.0.3-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs10-nodejs-0:10.23.1-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs14-nodejs-nodemon-0:2.0.3-5.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs12-nodejs-0:12.22.5-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-nodejs12-nodejs-nodemon-0:2.0.3-5.el7 *

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