Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTltcnEtY2pnaC0zMmcy

Low severity vulnerability that affects smartbanner.js

rel noopener vulnerability

Impact

Clicking on smartbanner View link and navigating to 3rd party page leaves window.opener exposed. It may allow hostile 3rd parties to abuse window.opener, e.g. by redirection or injection on the original page with smartbanner.

Patches

rel="noopener" is automatically populated to links as of v1.14.1 which is a recommended upgrade to resolve the vulnerability.

Workarounds

If you can not upgrade to v1.14.1:

  1. Ensure View link is only taking users to App Store or Google Play Store where security is guarded by respective app store security teams

  2. If View link is going to a 3rd party page, limit smartbanner.js to be used on iOS that decreases the scope of the vulnerability since as of Safari 12.1, rel="noopener" is imposed on all target="_blank" links.

    Following combination of smartbanner meta tags can be used to achieve the above:

    <meta name="smartbanner:enabled-platforms" content="none">
    <meta name="smartbanner:include-user-agent-regex" content="Mobile.*Safari">
    

References

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-9mrq-cjgh-32g2
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTltcnEtY2pnaC0zMmcy
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 4 years ago
Updated: over 1 year ago


Identifiers: GHSA-9mrq-cjgh-32g2
References: Repository: https://github.com/ain/smartbanner.js
Blast Radius: 0.0

Affected Packages

npm:smartbanner.js
Dependent packages: 1
Dependent repositories: 52
Downloads: 97,305 last month
Affected Version Ranges: < 1.14.1
Fixed in: 1.14.1
All affected versions: 0.0.1, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.14.0
All unaffected versions: 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.20.0, 1.21.0, 1.21.1, 1.22.0, 1.23.0, 1.24.0, 1.24.1