CVE Vulnerabilities

CVE-2019-19919

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

Published: Dec 20, 2019 | Modified: Jun 03, 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
4.2 LOW
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
Ubuntu
MEDIUM

Versions of handlebars prior to 4.3.0 are vulnerable to Prototype Pollution leading to Remote Code Execution. Templates may alter an Objects proto and defineGetter properties, which may allow an attacker to execute arbitrary code through crafted payloads.

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
Handlebars.js Handlebars.js_project 1.0.6 (including) 1.0.6 (including)
Handlebars.js Handlebars.js_project 1.0.7 (including) 1.0.7 (including)
Handlebars.js Handlebars.js_project 1.0.8 (including) 1.0.8 (including)
Handlebars.js Handlebars.js_project 1.0.9 (including) 1.0.9 (including)
Handlebars.js Handlebars.js_project 1.0.10 (including) 1.0.10 (including)
Handlebars.js Handlebars.js_project 1.0.11 (including) 1.0.11 (including)
Handlebars.js Handlebars.js_project 1.0.12 (including) 1.0.12 (including)
Handlebars.js Handlebars.js_project 1.1.0 (including) 1.1.0 (including)
Handlebars.js Handlebars.js_project 1.1.1 (including) 1.1.1 (including)
Handlebars.js Handlebars.js_project 1.1.2 (including) 1.1.2 (including)
Handlebars.js Handlebars.js_project 1.2.0 (including) 1.2.0 (including)
Handlebars.js Handlebars.js_project 1.2.1 (including) 1.2.1 (including)
Handlebars.js Handlebars.js_project 1.3.0 (including) 1.3.0 (including)
Handlebars.js Handlebars.js_project 2.0.0 (including) 2.0.0 (including)
Handlebars.js Handlebars.js_project 3.0.0 (including) 3.0.0 (including)
Handlebars.js Handlebars.js_project 3.0.1 (including) 3.0.1 (including)
Handlebars.js Handlebars.js_project 3.0.2 (including) 3.0.2 (including)
Handlebars.js Handlebars.js_project 3.0.3 (including) 3.0.3 (including)
Handlebars.js Handlebars.js_project 3.0.4 (including) 3.0.4 (including)
Handlebars.js Handlebars.js_project 3.0.5 (including) 3.0.5 (including)
Handlebars.js Handlebars.js_project 3.0.6 (including) 3.0.6 (including)
Handlebars.js Handlebars.js_project 3.0.7 (including) 3.0.7 (including)
Handlebars.js Handlebars.js_project 4.0.0 (including) 4.0.0 (including)
Handlebars.js Handlebars.js_project 4.0.1 (including) 4.0.1 (including)
Handlebars.js Handlebars.js_project 4.0.2 (including) 4.0.2 (including)
Handlebars.js Handlebars.js_project 4.0.3 (including) 4.0.3 (including)
Handlebars.js Handlebars.js_project 4.0.4 (including) 4.0.4 (including)
Handlebars.js Handlebars.js_project 4.0.5 (including) 4.0.5 (including)
Handlebars.js Handlebars.js_project 4.0.6 (including) 4.0.6 (including)
Handlebars.js Handlebars.js_project 4.0.7 (including) 4.0.7 (including)
Handlebars.js Handlebars.js_project 4.0.8 (including) 4.0.8 (including)
Handlebars.js Handlebars.js_project 4.0.9 (including) 4.0.9 (including)
Handlebars.js Handlebars.js_project 4.0.10 (including) 4.0.10 (including)
Handlebars.js Handlebars.js_project 4.0.11 (including) 4.0.11 (including)
Handlebars.js Handlebars.js_project 4.0.12 (including) 4.0.12 (including)
Handlebars.js Handlebars.js_project 4.0.13 (including) 4.0.13 (including)
Handlebars.js Handlebars.js_project 4.0.14 (including) 4.0.14 (including)
Handlebars.js Handlebars.js_project 4.1.0 (including) 4.1.0 (including)
Handlebars.js Handlebars.js_project 4.1.1 (including) 4.1.1 (including)
Handlebars.js Handlebars.js_project 4.1.2 (including) 4.1.2 (including)
Handlebars.js Handlebars.js_project 4.2.0 (including) 4.2.0 (including)
Handlebars.js Handlebars.js_project 4.2.1 (including) 4.2.1 (including)
Handlebars.js Handlebars.js_project 4.2.2 (including) 4.2.2 (including)
RHPAM 7.13.1 async RedHat handlebars *
Node-handlebars Ubuntu bionic *
Node-handlebars Ubuntu disco *
Node-handlebars Ubuntu eoan *
Node-handlebars Ubuntu trusty *

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