chore(deps): update dependency json5 to v2.2.2 [security] - #268
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency json5 to v2.2.2 [security]#268renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
2 times, most recently
from
January 30, 2025 18:09
22bf9f4 to
a81def3
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
February 9, 2025 17:16
a81def3 to
5246d47
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
March 3, 2025 16:55
5246d47 to
44a9014
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
March 13, 2025 19:36
44a9014 to
03d6dfa
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
April 1, 2025 14:30
03d6dfa to
d4918a3
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
May 19, 2025 20:26
d4918a3 to
ea53873
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
May 28, 2025 07:48
ea53873 to
8ecd937
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
June 22, 2025 12:30
8ecd937 to
0128cba
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
July 2, 2025 17:53
0128cba to
9c56a5e
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
August 4, 2025 23:30
9c56a5e to
be28f26
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
September 25, 2025 15:28
be28f26 to
79c95cd
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
November 10, 2025 20:12
79c95cd to
4f7b022
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
January 19, 2026 15:58
4f7b022 to
98d4e3b
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
February 2, 2026 14:47
98d4e3b to
1dcc9a7
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
March 30, 2026 17:40
1dcc9a7 to
e8529a9
Compare
renovate
Bot
force-pushed
the
renovate/npm-json5-vulnerability
branch
from
May 23, 2026 09:44
e8529a9 to
7ba97bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.2.0→2.2.2Prototype Pollution in JSON5 via Parse Method
CVE-2022-46175 / GHSA-9c47-m6qq-7p4h
More information
Details
The
parsemethod of the JSON5 library before and including version2.2.1does 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.parseand 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.Impact
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.Mitigation
This vulnerability is patched in json5 v2.2.2 and later. A patch has also been backported for json5 v1 in versions v1.0.2 and later.
Details
Suppose a developer wants to allow users and admins to perform some risky operation, but they want to restrict what non-admins can do. To accomplish this, they accept a JSON blob from the user, parse it using
JSON5.parse, confirm that the provided data does not set some sensitive keys, and then performs the risky operation using the validated data:If the user attempts to set the
isAdminkey, their request will be rejected:However, users can instead set the
__proto__key to{"isAdmin": true}.JSON5will parse this key and will set theisAdminkey on the prototype of the returned object, allowing the user to bypass the security check and run their request as an admin:Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
json5/json5 (json5)
v2.2.2Compare Source
__proto__are added to objects and arrays.([#199]) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! ([#295]).
v2.2.1Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.