Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browsersync has some vulnerabilities due to localtunnel and axios dependency #2055

Closed
2 of 10 tasks
classicmike opened this issue Nov 10, 2023 · 13 comments
Closed
2 of 10 tasks

Comments

@classicmike
Copy link

classicmike commented Nov 10, 2023

Issue details

Just ran an npm audit and it's listing a couple of vulnerabilities related to Browsersync and its dependencies, namely localtunnel which depends on a version of axios which has apparently got some vulerabilities.

This is a screenshot NPM audit with Browsersync having vulnerability issues on its dependency Localtunnel, which depends on Axios

Here is the link the the vulnerability report:
Axios Vulnerability Report

Axios had a fix which updated in the last few days.

Normally, this would be a straight forward task by upgrading localtunnel, which if it is still actively maintained would've got a version to fix. However it doesn't seem like it's being actively maintained.

A few questions:

  • Is browsersync still being maintained?
  • Are we able to get a version of browsersync which fixes this by either:
    1. Fixing localtunnel's vulnerabilities
    2. Removing localtunnel and installing something equivalent in behaviour?

Thanks.

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

  • Browsersync [2.29.3]
  • Node [20.6.1] - performed the audit on this version of node but could affect others.
  • Npm [9.8.1] - performed the audit on this version of npm but could affect others.

Affected platforms

  • other (please specify which) - surely this audit issue would affect all OS's
  • linux
  • windows
  • OS X
  • freebsd
  • solaris

Browsersync use-case

  • CLI
  • API
  • Gulp
  • Grunt

If CLI, please paste the entire command below

npm audit or npm audit --fix

@sawilde
Copy link

sawilde commented Nov 11, 2023

Would it be possible to make localtunnel an optionalDependancy, it appears to be abandoned and I don't believe that many users/developers require the capabilities it enables?

@G-Rath
Copy link

G-Rath commented Nov 15, 2023

Note that you mean an optional peer dependency - optionalDependencies is for dependencies that are OS dependent, so they'll still be installed by default if possible.

@sawilde
Copy link

sawilde commented Nov 16, 2023

@G-Rath you are right, thanks for the clarification (to be honest I have only read about them and never used them in anger so...)

  • I am going to re-tinker again with my attempt :)

@sawilde
Copy link

sawilde commented Nov 16, 2023

optional peer dependancies would work here - thanks to @G-Rath for correcting my understanding here

Note my fork of browsersync highlightsa lot of potential security issues (dependabot) but none that I haven't already addressed in my own repositories

sawilde#1

@classicmike
Copy link
Author

In related news: Somebody has created a PR to patch the Axios package which can be found here: localtunnel/localtunnel#633. I have sort of tried the upgrade and browser-sync doesn't seem to break. The only thing is that this PR hasn't been merged or doesn't seem to have a bump up to new version yet.

@sawilde
Copy link

sawilde commented Dec 13, 2023

@classicmike I don't think localtunnel is actively being maintained :(

@Venkatuidevloper
Copy link

Hello there..

Browser-sync - package has AXIOS vulnerability; is that addressed in the upcoming release?
Link - Axios Vulnerability Report
image

@shakyShane
Copy link
Contributor

yeah it's time to drop localtunnel, I'll do a 3.0 with it moved

@shakyShane
Copy link
Contributor

fixed in #2059

npm i browser-sync@3

:)

@sawilde
Copy link

sawilde commented Dec 27, 2023

Thankyou - I was about to make my own patched version of localtunnel (just planning on how I'd deploy it to npm) and then use overrides to swap it out

@shakyShane
Copy link
Contributor

Yeah I was considering other ways, but since I assume this has very low usage I'd rather just prune the dep altogether. 👍🏻

@classicmike
Copy link
Author

Thanks @shakyShane for the bump! :)

@sawilde
Copy link

sawilde commented Dec 29, 2023

For anyone wanting to still use localtunnel I have created a patched version and pushed it to npmjs

If you want to use it as a direct replacement for localtunnel and still use the --tunnel switch with browser-sync then you can add the following to your devDependancies

  "devDependencies" : {
    ...,
    "localtunnel": "https://registry.npmjs.org/@security-patched/localtunnel/-/localtunnel-2.0.2-secpatched.3.tgz",
    ...,
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants