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

dns-packet Dependency - Security bump required for webpack-dev-server 3.11.2 #3340

Closed
1 of 2 tasks
guedesantonio opened this issue May 24, 2021 · 10 comments
Closed
1 of 2 tasks

Comments

@guedesantonio
Copy link

guedesantonio commented May 24, 2021

Operating System: MacOS 11.2.3

Node Version: v14.16.1

NPM Version: 6.14.12

webpack Version: 5.4.0

webpack-dev-server Version: 3.11.2

Browser: Chrome 87.0.4280.141

  • This is a bug
  • This is a modification request

Code

Dependency dns-packet has a security advisory: https://www.npmjs.com/advisories/1745

High Memory Exposure
Package dns-packet
Patched in >=5.2.2
Dependency of webpack-dev-server [dev]
Path webpack-dev-server > bonjour > multicast-dns > dns-packet
More info https://npmjs.com/advisories/1745

RELATED:

There is a issue in Bonjour npm dependency about dns-packet as well : watson/bonjour#63

For Bugs; How can we reproduce the behavior?

Run npm-audit

@noppa
Copy link

noppa commented May 25, 2021

If anyone has their builds failing because of this or something and happens to be using yarn,

  "resolutions": {
    "multicast-dns": "7.2.3"
  }

in package.json remediates the audit error. That could be a breaking change for some multicast-dns-using features of webpack-dev-server of course, but at least basic dev server functionality is still working fine for us.

@alexander-akait
Copy link
Member

alexander-akait commented May 25, 2021

We can't fix it on our side, please track it here watson/bonjour#63

@apepper
Copy link

apepper commented May 25, 2021

We can't fix it on our side, please track it here watson/bonjour#63

bonjour was last updated five years ago. I have my doubts that it will release a new version. I haven't looked into it, but maybe there is a more up-to-date package that could replace bonjour.

@kjg
Copy link

kjg commented May 25, 2021

https://www.npmjs.com/package/@homebridge/ciao could be a possible bonjour replacement

@daynewright
Copy link

daynewright commented May 25, 2021

Also there is an active fork that might be a possibility: https://github.com/onlxltd/bonjour-service
(mentioned in this PR as well: watson/bonjour#62)

@alexander-akait
Copy link
Member

If the problem will not be fixed to our stable v4 release, we will migrate on fork

olix0r added a commit to linkerd/linkerd2 that referenced this issue May 25, 2021
Our web development environment has a dependency on webpack-dev-server,
which pulls in bonjour, which pulls in multicast-dns, which depends on
dns-packet, which has a [critical security vulnerability][1].

webpack/webpack-dev-server#3340 tracks fixing this dependency, but it
appears that the bonjour project is no longer maintained.

This change works around this issue by patching the multicast-dns
dependency to pull in a fixed version. This could potentially break mdns
functionality in our development environment, but we probably don't even
use this functionality.

Dependencies are bad.

[1]: https://nvd.nist.gov/vuln/detail/CVE-2021-23386
olix0r added a commit to linkerd/linkerd2 that referenced this issue May 25, 2021
Our web development environment has a dependency on webpack-dev-server,
which pulls in bonjour, which pulls in multicast-dns, which depends on
dns-packet, which has a [critical security vulnerability][1].

webpack/webpack-dev-server#3340 tracks fixing this dependency, but it
appears that the bonjour project is no longer maintained.

This change works around this issue by patching the multicast-dns
dependency to pull in a fixed version. This could potentially break mdns
functionality in our development environment, but we probably don't even
use this functionality.

Dependencies are bad.

[1]: https://nvd.nist.gov/vuln/detail/CVE-2021-23386
blattersturm added a commit to citizenfx/fivem that referenced this issue May 25, 2021
webpack/webpack-dev-server#3340 -> webpack-dev-server -> bonjour (5 year old abandoned package) -> multicast-dns -> dns-packet. JS is fun
olix0r added a commit to linkerd/linkerd2 that referenced this issue May 25, 2021
Our web development environment has a dependency on webpack-dev-server,
which pulls in bonjour, which pulls in multicast-dns, which depends on
dns-packet, which has a [critical security vulnerability][1].

webpack/webpack-dev-server#3340 tracks fixing this dependency, but it
appears that the bonjour project is no longer maintained.

This change works around this issue by patching the multicast-dns
dependency to pull in a fixed version. This could potentially break mdns
functionality in our development environment, but we probably don't even
use this functionality.

Dependencies are bad.

[1]: https://nvd.nist.gov/vuln/detail/CVE-2021-23386
@apepper
Copy link

apepper commented May 26, 2021

Maybe mulitcast-dns can be convinced to release an update version 6: mafintosh/multicast-dns#75.

@mafintosh
Copy link

v6 is fixed as of yesterday, if you reinstall deps. It's tracking dns-packet v1 to which I backported a fix.

@mdidon
Copy link

mdidon commented May 27, 2021

Also there is an active fork that might be a possibility: https://github.com/onlxltd/bonjour-service
(mentioned in this PR as well: watson/bonjour#62)

@daynewright Can confirm this issue has now been addressed in https://github.com/onlxltd/bonjour-service v1.0.8.
Hope this helps

@alexander-akait
Copy link
Member

Fixed https://www.npmjs.com/advisories/1745/versions, update deps locally 1.3.4 is no affected

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

8 participants