Skip to content

← Public intelligence

npm package

json5

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

1 actionable advisory, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.1npmAmendedPublished

    Prototype Pollution in JSON5 via Parse Method

    CVE-2022-46175 · GHSA-9c47-m6qq-7p4h

    Affected
    • npm json5 >= 2.0.0, < 2.2.2; < 1.0.2
    Fixed in
    1.0.22.2.2· Vendor fix available
    Issue
    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. 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…

    Recommended action: Upgrade to 2.2.2 or 1.0.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →