Vulnerabilities/

Prototype Pollution in JSON5 via Parse Method

Severity:
High

Description

The parse method of the JSON5 library before and including version 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.

Recommendation

Update the json5 package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
json5
Anything's wrong? Let us know Last updated on February 22, 2024

This issue is available in SmartScanner Professional

See Pricing