cbcvebase.
CVE-2022-46175
published 2022-12-24

CVE-2022-46175: 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…

PriorityP357high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
9.30%
94.8th percentile
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.

Affected

11 ranges
VendorProductVersion rangeFixed in
debiannode-json5< node-json5 2.2.3+dfsg-1 (bookworm)node-json5 2.2.3+dfsg-1 (bookworm)
fedoraprojectfedora
json5json5< 2.2.22.2.2
json5json5< 1.0.21.0.2
json5json5>= 0 < 1.0.21.0.2
json5json5>= 2.0.0 < 2.2.22.2.2
json5json5>= 2.0.0 < 2.2.22.2.2
msrcazl3_python-tensorboard_2.11.0-3_on_azure_linux_3.0
msrcazl3_python-tensorboard_2.16.2-2_on_azure_linux_3.0
msrcazure_linux_3.0_arm
msrcazure_linux_3.0_x64

Detection & IOCsextracted from sources · hover to see the quote

  • Detect prototype pollution attempts via JSON5.parse by monitoring for input strings containing `__proto__` keys in JSON5-parsed data
  • Flag or block any JSON5 input payloads containing the literal key `__proto__` being passed to JSON5.parse, as this is the specific attack vector for prototype pollution
  • Identify vulnerable json5 library versions 1.0.1 and below, or 2.2.1 and below in application dependency manifests (package.json, package-lock.json, yarn.lock); patched versions are 1.0.2 and 2.2.2
  • ·This vulnerability pollutes the prototype of the specific object returned by JSON5.parse, NOT the global Object prototype — impact is scoped to how the returned object is subsequently used in the application
  • ·The json5 package is a build-time dependency in Red Hat products and is not used in production runtime, reducing exploitability in those environments

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv8.8HIGH
vendor_debian7.1HIGH
vendor_msrc7.1HIGH
vendor_redhat7.1HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.