CVE catalog

CVE-2022-46175

node-json5: CVE-2022-46175

[CVE catalog]

Severity
High · CVSS 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
9.70% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiannode-json5sid2.2.3+dfsg-8fixed
Debiannode-json5forky2.2.3+dfsg-8fixed
Debiannode-json5trixie2.2.3+dfsg-1fixed
Debiannode-json5bookworm2.2.3+dfsg-1fixed
Npmjson5Not reported1.0.2fixed
Npmjson5Not reported1.0.2fixed
Ubuntunode-json5pro2.1.3-2vulnerable
Ubuntunode-json5pro2.1.3-3vulnerable
Ubuntunode-json5pro2.2.0+dfsg-1vulnerable
Ubuntunode-json5pro2.2.0+dfsg-1ubuntu0.1~esm1fixed
Ubuntunode-json520.040.5.1-1vulnerable
Ubuntunode-json520.040.5.1-3vulnerable
Ubuntunode-json520.040.5.1-3ubuntu0.1fixed
Ubuntunode-json5pro2.1.3-2vulnerable
Ubuntunode-json5pro2.1.3-3vulnerable
Ubuntunode-json5pro2.2.0+dfsg-1vulnerable
Ubuntunode-json5pro2.2.0+dfsg-1ubuntu0.1~esm1fixed
Ubuntunode-json520.040.5.1-1vulnerable
Ubuntunode-json520.040.5.1-3vulnerable
Ubuntunode-json520.040.5.1-3ubuntu0.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannode-json5sourcesid2.2.3+dfsg-1not yet assignedNot reported[1027145]
Debiannode-json5sourceforky2.2.3+dfsg-1not yet assignedNot reported[1027145]
Debiannode-json5sourcetrixie2.2.3+dfsg-1not yet assignedNot reported[1027145]
Debiannode-json5sourcebookworm2.2.3+dfsg-1not yet assignedNot reported[1027145]
Npmjson5npmNot reported1.0.2Not reportedGHSA-9C47-M6QQ-7P4HNot reported
Npmjson5npmNot reported1.0.2Not reportedNot reportedNot reported
Ubuntunode-json5debpro2.2.0+dfsg-1ubuntu0.1~esm1Not reportedUSN-6758-1Not reported
Ubuntunode-json5deb20.040.5.1-3ubuntu0.1Not reportedUSN-6758-1Not reported
Ubuntunode-json5debpro2.2.0+dfsg-1ubuntu0.1~esm1Not reportedUBUNTU-CVE-2022-46175Not reported
Ubuntunode-json5deb20.040.5.1-3ubuntu0.1Not reportedUBUNTU-CVE-2022-46175Not reported

[Debian bug #1027145]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [node-json5]Fixed
    Details (2)
    • 2.2.3+dfsg-1 · all · bookworm

      Fixed · Fixed: 2.2.3+dfsg-1

      dsa · node-json5 · debian · bookworm

    • 2.2.3+dfsg-1 · all · bookworm

      Fixed · Fixed: 2.2.3+dfsg-1

      dsa · node-json5 · debian · bookworm

Observed:

References