@fluentui/styles@0.47.12 vulnerabilities

A set of styling utilities for CSS-in-JS.

  • latest version

    0.66.5

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    1 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Prototype Pollution

    @fluentui/styles is a set of styling utilities for CSS-in-JS.

    Affected versions of this package are vulnerable to Prototype Pollution. The deepmerge function available within the styles package of FluentUI allows one object to merge with another recursively. Given a value such as __proto__, this value is merged without any prior validation. __proto__ will modify the properties of all existing properties and new properties resulting in pollution of an object's prototype.

    PoC

    var styles = require("@fluentui/styles");
    var malicious_payload = '{"__proto__":{"vulnerable":"Polluted"}}';
    var source2 = {
        k3: { }  
      };
    var x = styles.deepmerge(source2, JSON.parse(malicious_payload))
    console.log({}.vulnerable)
    

    How to fix Prototype Pollution?

    Upgrade @fluentui/styles to version 0.50.0 or higher.

    <0.50.0