Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

CVE-2022-46175

Published: 24 December 2022

JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). The `parse` method of the JSON5 library before and including versions 1.0.1 and 2.2.1 does not restrict parsing of keys named `__proto__`, allowing specially crafted strings to pollute the prototype of the resulting object. This vulnerability pollutes the prototype of the object returned by `JSON5.parse` and not the global Object prototype, which is the commonly understood definition of Prototype Pollution. However, polluting the prototype of a single object can have significant security impact for an application if the object is later used in trusted operations. This vulnerability could allow an attacker to set arbitrary and unexpected keys on the object returned from `JSON5.parse`. The actual impact will depend on how applications utilize the returned object and how they filter unwanted keys, but could include denial of service, cross-site scripting, elevation of privilege, and in extreme cases, remote code execution. `JSON5.parse` should restrict parsing of `__proto__` keys when parsing JSON strings to objects. As a point of reference, the `JSON.parse` method included in JavaScript ignores `__proto__` keys. Simply changing `JSON5.parse` to `JSON.parse` in the examples above mitigates this vulnerability. This vulnerability is patched in json5 versions 1.0.2, 2.2.2, and later.

Priority

Medium

Cvss 3 Severity Score

8.8

Score breakdown

Status

Package Release Status
node-json5
Launchpad, Ubuntu, Debian
bionic
Released (0.5.1-1ubuntu0.1~esm1)
Available with Ubuntu Pro
focal
Released (0.5.1-3ubuntu0.1)
jammy
Released (2.2.0+dfsg-1ubuntu0.1~esm1)
Available with Ubuntu Pro
kinetic Ignored
(end of life, was needs-triage)
lunar Ignored
(end of life, was needs-triage)
mantic Not vulnerable
(2.2.3+dfsg-1build1)
noble Not vulnerable
(2.2.3+dfsg-1build1)
trusty Ignored
(end of standard support)
upstream
Released (2.2.2)
xenial Ignored
(end of standard support)
Patches:
upstream: https://github.com/json5/json5/commit/7774c1097993bc3ce9f0ac4b722a32bf7d6871c8

Severity score breakdown

Parameter Value
Base score 8.8
Attack vector Network
Attack complexity Low
Privileges required Low
User interaction None
Scope Unchanged
Confidentiality High
Integrity impact High
Availability impact High
Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H