webpack-dev-server vulnerability
Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
- [X] dependencies
Versions
node: 10.14.2 npm: 6.4.1
Angular CLI: 7.1.4
Node: 10.14.2
OS: win32 x64
Angular: 7.1.4
@angular-devkit/architect 0.10.7
@angular-devkit/build-angular 0.11.4
@angular-devkit/build-optimizer 0.11.4
@angular-devkit/build-webpack 0.10.7
@angular-devkit/core 7.0.7
@angular-devkit/schematics 7.1.4
@ngtools/webpack 7.1.4
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.19.1
--
Repro steps
npm install
The log given by the failure
=== npm audit security report === Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
High Missing Origin Validation
Package webpack-dev-server
Patched in >=3.1.11
Dependency of @angular-devkit/build-angular [dev]
Path @angular-devkit/build-angular > webpack-dev-server
More info https://nodesecurity.io/advisories/725
found 1 high severity vulnerability in 78596 scanned packages
1 vulnerability requires manual review. See the full report for details.
--
I guess it will be fixed in next release https://github.com/angular/angular-cli/pull/13277
I’ll back port the fix to the patch branch later on today
updating to version 3.1.14 may not work, as per https://github.com/webpack/webpack-dev-server/issues/1615
Actually, upgrading to 3.1.14 might work, if the typo in the vulnerability database had been fixed: https://npm.community/t/npm-audit-sweems-to-get-semver-wrong/4352/4
Thanks @Diaan for your input.
I am also getting the Missing Origin Validation vulnerability.
Steps to reproduce:
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli
npm cache verify
cd c:\src
c:\src>ng new spa
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ http://sass-lang.com ]
added 1133 packages from 1180 contributors and audited 40178 packages in 41.531s found 1 high severity vulnerability
c:\src >cd spa
c:\src\spa>npm audit
=== npm audit security report === Manual Review Some vulnerabilities require your attention to resolve Visit https://go.npm.me/audit-guide for additional guidanceHigh Missing Origin Validation Package webpack-dev-server Patched in >=3.1.11 Dependency of @angular-devkit/build-angular [dev] Path @angular-devkit/build-angular > webpack-dev-server More info https://nodesecurity.io/advisories/725
found 1 high severity vulnerability in 40178 scanned packages 1 vulnerability requires manual review. See the full report for details.
c:\src\spa>npm audit fix
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 5.196s fixed 0 of 1 vulnerability in 40178 scanned packages 1 vulnerability required manual review and could not be updated
c:\src\spa>npm install webpack-dev-server --save-dev
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
- [email protected] added 39 packages from 17 contributors, updated 4 packages and audited 43619 packages in 10.377s found 1 high severity vulnerability run
npm audit fixto fix them, ornpm auditfor details
c:\src\spa>npm audit
=== npm audit security report === Manual Review Some vulnerabilities require your attention to resolve Visit https://go.npm.me/audit-guide for additional guidanceHigh Missing Origin Validation Package webpack-dev-server Patched in >=3.1.11 Dependency of @angular-devkit/build-angular [dev] Path @angular-devkit/build-angular > webpack-dev-server More info https://nodesecurity.io/advisories/725
found 1 high severity vulnerability in 43619 scanned packages 1 vulnerability requires manual review. See the full report for details.
c:\src\spa>ng update
We analyzed your package.json and everything seems to be in order. Good work!
Notice the different webpack and webpack-dev-server dependencies:
C:\src\spa\node_modules@angular-devkit\build-angular\package.json
{
"_from": "@angular-devkit/build-angular@~0.11.0",
"_id": "@angular-devkit/[email protected]",
"dependencies": {
"webpack": "4.23.1",
"webpack-dev-server": "3.1.10",
},
}
C:\src\spa\node_modules@angular-devkit\build-webpack\package.json
{
"_from": "@angular-devkit/[email protected]",
"_id": "@angular-devkit/[email protected]",
"peerDependencies": {
"webpack": "^4.6.0",
"webpack-dev-server": "^3.1.4"
},
}
C:\src\spa\node_modules\webpack-dev-server\package.json
{
"_from": "[email protected]",
"_id": "[email protected]",
"peerDependencies": {
"webpack": "^4.0.0"
},
}
[https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/package.json] (updated 7 days ago)
{
"name": "@angular-devkit/build-angular",
"dependencies": {
"webpack-dev-server": "3.1.14"
},
}
[https://www.npmjs.com/package/@angular-devkit/build-angular] (published 14 days ago)
Do you have an ETA for updating the npm package?
cref: https://nodesecurity.io/advisories/725 https://npm.community/t/npm-audit-sweems-to-get-semver-wrong/4352/9 https://github.com/facebook/create-react-app/issues/6109
Am getting this same error.
` npm audit === npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
High Missing Origin Validation Package webpack-dev-server Patched in >=3.1.11 Dependency of @angular-devkit/build-angular Path @angular-devkit/build-angular > webpack-dev-server More info https://nodesecurity.io/advisories/725`
please let me know if there any patch update for the devkit or it transient webpack
@alan-agius4 I am really surprised that this isn't being addressed quicker.
It impacts every single person using @angular-devkit/build-angular
The frequency isn't low, it is high.
While it may be a false positive in terms of the actual security risk (just a typo), it is clearly an issue for those trying use npm audit in their build pipeline.
Just coming in late to this thread.
It impacts every single person using @angular-devkit/build-angular
If I read the vulnerability correctly, it only affects people doing HMR, and having a server listening on something too permissive (we default to localhost), right? This is far from "every single person".
That being said, we should still fix it. In general though, I would avoid hyperboles when it comes to security. NPM audit is known to be crying wolf a bit.
@hansl npm audit throws a big red flag for anyone who installs @angular-devkit/build-angular
npm install @angular-devkit/build-angular
+ @angular-devkit/[email protected]
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
After reading the details of what is presumed to be the issue, a typo, I agree and stated in my post that from a security perspective it isn't a huge deal (in an effort to avoid hyperbole), but it took me some digging to make that determination myself. Wouldn't you want a clean install of @angular-devkit/build-angular ?
So, yes, it is every single person that installs @angular-devkit/build-angular will see that audit error. We can debate the validity of npm audit but the high severity vulnerability message displays to everyone.
Feel free to correct me if I am wrong.
+1
@hansl I get this alert now in 5 of my angular project. This PR and comment provides information on likely fix "next Wednesday" https://github.com/angular/angular-cli/pull/13347#issuecomment-451145500
@mjknight50, Yes, we do agree that this should be addressed, and as a mater of fact there is a PR in the merge queue and it will be released earlier next week.
While the audit message is shown to everybody the vulnerability itself only impacts a small group of people, and hence cutting a release late in the week for this week had a small benefit with a high risk.
+1 waiting for fix
+1 waiting for fix
The problem is that everybody who sees this error and cares about his projects has to spend the time to find out what's going on. Took me "only" 20..30 minutes, but could be better spent.
+1 waiting for fix
+1 waiting for fix
Spamming „+1 waiting for fix“ does not speed up the process 🤨
But adding +1 might increase your bug frequency label from 'low' to 'high' :)