Skip to content

Dependency on specific version of ua-parser-js prevents vulnerabilities in downstream projects from being fixed #2009

@mattwelke

Description

@mattwelke

Issue details

I was addressing a Dependabot security vulnerability but it said that my project could not update to a fixed version of the dependency in question, ua-parser-js, because browser-sync requires a specific version of it:

updater | INFO <job_587648674> Requirements update strategy bump_versions
updater | INFO <job_587648674> The latest possible version that can be installed is 1.0.2 because of the following conflicting dependencies:
updater | <job_587648674> 
updater | <job_587648674>   browser-sync@2.27.11 requires ua-parser-js@1.0.2
updater | <job_587648674>   No patched version available for ua-parser-js
updater | INFO <job_587648674> The earliest fixed version is 1.0.33.
updater | INFO <job_587648674> Finished job processing

Steps to reproduce/test case

  1. Create NPM project that uses browser-sync

  2. Add dependency on browser-sync@2.27.11 to project. Observe warning message: 2 high severity vulnerabilities

  3. Run npm audit fix. Observe error:

    ua-parser-js  0.8.1 - 1.0.32
    Severity: high
    ReDoS Vulnerability in ua-parser-js version  - https://github.com/advisories/GHSA-fhg7-m89q-25r3
    fix available via `npm audit fix --force`
    Will install browser-sync@2.27.5, which is a breaking change
    node_modules/ua-parser-js
      browser-sync  >=2.27.6
      Depends on vulnerable versions of ua-parser-js
      node_modules/browser-sync
    
    2 high severity vulnerabilities
    

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [2.27.11]
  • Node [v18.12.1]
  • Npm [9.1.3]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

n/a

CLI is the way it's used in my project but this issue comes up before it is used as a CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions