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

http-proxy vulnerability #2605

Closed
1 of 2 tasks
panuhorsmalahti opened this issue May 15, 2020 · 16 comments
Closed
1 of 2 tasks

http-proxy vulnerability #2605

panuhorsmalahti opened this issue May 15, 2020 · 16 comments

Comments

@panuhorsmalahti
Copy link

panuhorsmalahti commented May 15, 2020

  • webpack-dev-server Version: 3.11.0
  • This is a bug
  • This is a modification request

http-proxy, a dependency of webpack-dev-server has a vulnerability.

=== npm audit security report ===                        
                                                                                
                                                                                
                                 Manual Review                                  
             Some vulnerabilities require your attention to resolve             
                                                                                
          Visit https://go.npm.me/audit-guide for additional guidance           
                                                                                
                                                                                
  High            Denial of Service                                             
                                                                                
  Package         http-proxy                                                    
                                                                                
  Patched in      No patch available                                            
                                                                                
  Dependency of   webpack-dev-server [dev]                                      
                                                                                
  Path            webpack-dev-server > http-proxy-middleware > http-proxy       
                                                                                
  More info       https://npmjs.com/advisories/1486       
`-- webpack-dev-server@3.11.0
  `-- http-proxy-middleware@0.19.1
    `-- http-proxy@1.18.0

More info:
http-party/node-http-proxy#1446
https://www.npmjs.com/advisories/1486

@panuhorsmalahti panuhorsmalahti changed the title http-proxy http-proxy vulnerability May 15, 2020
@aitchiss
Copy link

Came here to report the same - it's causing failing builds with npm audit - hoping a quick fix is on its way

@alexander-akait
Copy link
Member

alexander-akait commented May 15, 2020

Please open an issue in http-proxy-middleware or http-proxy, all version affected of http-proxy, we can't fix it on our side

@trevoreyre
Copy link

There is an open issue in http-proxy for this. http-party/node-http-proxy#1446

I think this issue should remain open, since webpack-dev-server will need to be patched with the fixed version of http-proxy once it's available.

@sailfish009

This comment has been minimized.

@chimurai
Copy link
Contributor

chimurai commented May 17, 2020

Hi, maintainer of http-proxy-middleware.

http-party/node-http-proxy#1447 just got published in http-proxy@1.18.1

Will patch http-proxy-middleware soon.

Any reason for WDS to support deprecated node >=6.11.5?
https://github.com/webpack/webpack-dev-server/blob/master/package.json#L14

http-proxy-middleware started dropping support for node 6 in 0.20.0

If possible, migrate to http-proxy-middleware@1.x.x ; Which supports node 8 and up.
Only breaking change is node support and explicit import of http-proxy-middleware.
More info: https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.0

I know it's a constant struggle to support legacy, fix security issues versus moving on...

Let me know if the older version needs patching too (0.19.x)

edit: refreshing/updating lockfiles should already work

@vtereshyn
Copy link

vtereshyn commented May 18, 2020

Fixed inside #2616

@chimurai
Copy link
Contributor

Just published http-proxy-middleware@0.19.2

Hopefully this'll ease the process to patch the current version of WDS without rushing to release WDS@4.0

@alexander-akait
Copy link
Member

Great, so just update your lock files and all will be fine 👍

@koltyakov
Copy link

@evilebottnawi, Updating locks is possible but a fragile solution. If possible to bump WDS v3 with a version of http-proxy-middleware without vulnerability and still with Node v6 support, why not? That should not introduce a breaking change anymore, isn't it? Do you see any risks?

@pamit
Copy link

pamit commented May 26, 2020

Hi everyone. Is there any update on this?

@mikemountjoy99
Copy link

What is the current status on a fix for this vulnerability?
I see http-proxy have merged a patch
https://github.com/http-party/node-http-proxy/pull/1447/files

@filmic
Copy link

filmic commented Jun 3, 2020

You just need to force yarn to update http-proxy indirect dependency version in the lock file (to version 1.18.1).

Yarn does not upgrade indirect dependencies when yarn upgrade is executed (yarnpkg/yarn#4986).

As workaround run:
yarn remove webpack-dev-server
yarn add webpack-dev-server -D

@mikemountjoy99
Copy link

mikemountjoy99 commented Jun 10, 2020

Editing package.json and adding an entry for http-proxy-middleware under resolutions forced the package to install

"resolutions": {
    "http-proxy-middleware": "^1.0.4"

I then ran yarn & yarn audit

yarn

Running an audit showed the high severity warning had gone away:

yarn audit 

Output:

1 vulnerabilities found - Packages audited: 3384
Severity: 1 Low
✨  Done in 3.08s.

@jasverix
Copy link

This means that webpack-dev-server runs fine on http-proxy-middleware 1.0.4? Is it possible to upgrade it? I can make a pull request of course, but I don't know this package well enough to be aware of eventual consequences of that upgrade.

@chrislujan
Copy link

I would also like to see this done as it is causing our engineers difficulties

@alexander-akait
Copy link
Member

Fixed in v4 branch (release will be soon)

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