CVE-2022-21824: Prototype pollution via console.table properties
Due to the formatting logic of the "console.table()" function it was not safe to allow user controlled input to be passed to the "properties" parameter while simultaneously passing a plain object with at least one property as the first parameter, which could be "proto". The prototype pollution has very limited control, in that it only allows an empty string to be assigned to numerical keys of the object prototype.Node.js >= 12.22.9, >= 14.18.3, >= 16.13.2, and >= 17.3.1 use a null protoype for the object these properties are being assigned to.
Other sources
Due to the formatting logic of the console.table() function it was not safe to allow user controlled input to be passed to the properties parameter while simultaneously passing a plain object with at least one property as the first parameter, which could be proto. The prototype pollution has very limited control, in that it only allows an empty string to be assigned to numerical keys of the object prototype.
Versions of Node.js with the fix for this use a null prototype for the object these properties are being assigned to.
More details will be available at CVE-2022-21824 after publication.
Thanks to Patrik Oldsberg (rugvip) for reporting this vulnerability.
All versions of the 17.x, 16.x, 14.x, and 12.x releases lines.
— Node.Js
Due to the formatting logic of the console.table() function it was not safe to allow user controlled input to be passed to the properties parameter while simultaneously passing a plain object with at least one property as the first parameter, which could be proto. The prototype pollution has very limited control, in that it only allows an empty string to be assigned to numerical keys of the object prototype.
Versions of Node.js with the fix for this use a null protoype for the object these properties are being assigned to.
Reference: https://nodejs.org/en/blog/vulnerability/jan-2022-security-releases/
— Red Hat
Due to the formatting logic of the console.table() function it was not safe to allow user controlled input to be passed to the properties parameter while simultaneously passing a plain object with at least one property as the first parameter, which could be proto. The prototype pollution has very limited control, in that it only allows an empty string to be assigned to numerical keys of the object prototype. See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824 for more details.
— Node.Js
Node.js could provide weaker than expected security, caused by an error related to the formatting logic of the console.table() function. An attacker could exploit this vulnerability using console.table properties to allow an empty string to be assigned to numerical keys of the object prototype.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/rh-nodejs12-nodejsto a version that resolves this vulnerability.Fixed in 0:12.22.12-2.el7 - Upgrade
Upgrade
redhat/rh-nodejs14-nodejsto a version that resolves this vulnerability.Fixed in 0:14.20.1-2.el7 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 12.22.9 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 14.18.3 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 16.13.2 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 17.3.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.9Fixed in 14.18.3Fixed in 16.13.2Fixed in 17.3.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.9 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.18.3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.13.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 17.3.1 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 18.20.4+dfsg-1~deb12u2Fixed in 18.20.4+dfsg-1~deb12u3Fixed in 20.19.2+dfsg-1+deb13u2Fixed in 20.19.2+dfsg-1+deb13u3Fixed in 24.21.0+dfsg+~cs24.13.4-1Fixed in 24.22.2+dfsg+~cs24.19.2-1 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 12.22.10-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 14.19.0-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 16.13.2-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 17.3.1-r0 - Upgrade
Upgrade
alpine/openjdk11to a version that resolves this vulnerability.Fixed in 11.0.15_p10-r0 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 12.22.9~dfsg-1
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2022-21824.
What is the severity of CVE-2022-21824?
The severity of CVE-2022-21824 is high (8.2).
Which software is affected by CVE-2022-21824?
The following software are affected by CVE-2022-21824: - Node.js versions up to 12.22.9 - Node.js versions up to 14.18.3 - Node.js versions up to 16.13.2 - Node.js versions up to 17.3.1 - Rh-nodejs12-nodejs versions up to 0:12.22.12-2.el7 - Rh-nodejs14-nodejs versions up to 0:14.20.1-2.el7 - Debian Node.js version 10.24.0~dfsg-1~deb10u1 - Oracle MySQL Cluster versions up to 8.0.29 - Oracle MySQL Connectors versions up to 8.0.28 - Oracle MySQL Enterprise Monitor versions up to 8.0.29 - Oracle MySQL Server versions up to 8.0.29 - Oracle MySQL Workbench versions up to 8.0.28 - Oracle PeopleSoft Enterprise PeopleTools version 8.58 - Oracle PeopleSoft Enterprise PeopleTools version 8.59 - Debian Debian Linux version 10.0 - Debian Debian Linux version 11.0 - NetApp OnCommand Insight - NetApp OnCommand Workflow Automation - Netapp Snapcenter - IBM Cognos Analytics 11.2.x - IBM Cognos Analytics 11.1.x
How does CVE-2022-21824 impact Node.js?
CVE-2022-21824 impacts Node.js by allowing user-controlled input to be passed to the 'properties' parameter of the 'console.table()' function, potentially leading to prototype pollution.
How can CVE-2022-21824 be fixed?
To fix CVE-2022-21824, it is recommended to upgrade to the following versions: - Node.js 12.22.9 - Node.js 14.18.3 - Node.js 16.13.2 Or apply the appropriate patch provided by your software vendor.