node-forge and postcss Vulnerabilities with Vue 2
See original GitHub issue- Laravel Mix Version: 6.0.39
- Node Version (
node -v
): 16.6.1 - NPM Version (
npm -v
): 8.3.0 - OS: Windows 11
Description:
I use VueJS 2 for my frontend and I am using laravel-mix to compile the assets. Recently, I came across a vulnerability reported by NPM regarding node-forge which is a dependency installed due to laravel-mix and one for postcss which is caused due to vue-loader < 17.0.0 . I tried upgrading to vue-loader 17.0.0 but that broke my webpack compilation. I request your help in resolving these vulnerabilities without breaking the code.
package.json
"devDependencies": {
"axios": "^0.24.0",
"css-loader": "^6.5.1",
"laravel-mix": "^6.0.39",
"lodash": "^4.17.21",
"sass": "^1.45.1",
"sass-loader": "^12.4.0",
"vue": "^2.6.14",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14"
},
vulnerabilities reported in npm audit
:
# npm audit report
node-forge <1.0.0
Prototype Pollution in node-forge debug API. - https://github.com/advisories/GHSA-5rrq-pxf6-6jx5
fix available via `npm audit fix --force`
Will install laravel-mix@1.1.1, which is a breaking change
node_modules/node-forge
selfsigned >=1.1.1
Depends on vulnerable versions of node-forge
node_modules/selfsigned
webpack-dev-server >=2.5.0
Depends on vulnerable versions of selfsigned
node_modules/webpack-dev-server
laravel-mix >=1.2.0
Depends on vulnerable versions of webpack-dev-server
node_modules/laravel-mix
postcss <8.2.13
Severity: moderate
Regular Expression Denial of Service in postcss - https://github.com/advisories/GHSA-566m-qj78-rww5
fix available via `npm audit fix --force`
Will install vue-loader@17.0.0, which is a breaking change
node_modules/@vue/component-compiler-utils/node_modules/postcss
@vue/component-compiler-utils *
Depends on vulnerable versions of postcss
node_modules/@vue/component-compiler-utils
vue-loader 15.0.0-beta.1 - 15.9.8
Depends on vulnerable versions of @vue/component-compiler-utils
node_modules/vue-loader
Error if I try to use vue-loader v17.0.0:
[webpack-cli] Error: Cannot find module 'vue/compiler-sfc'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:8
Top Results From Across the Web
lots of vulnerability using NPM - Laracasts
i just installed Vue using vue cli , problem is i got so many vulnerabilities for example iused this command npm install --save...
Read more >vue/cli-service@3.12.1 vulnerabilities - Snyk
Learn more about @vue/cli-service@3.12.1 vulnerabilities. @vue/cli-service@3.12.1 has 16 known vulnerabilities found in 64 vulnerable paths.
Read more >how to fix vue-cli-service vulnerability? - Stack Overflow
I was setting up a new Vue project and got the same issue. I was able to find a post on Github Vue/Vue-cli...
Read more >Fixing security vulnerabilities in npm dependencies in less ...
🔭 npm audit 2.1) To fix any dependency, you need to first know which npm package depends on that. This will tell you...
Read more >Security vulnerabilities with postcsss package prior to version ...
GitHub reported a security vulnerability it recommended simply adding a dependency of “postcss”: “>=8.2.10”, This does not resolve the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For postcss, I added a comment to the impacted resolve-url-loader (4.0.0) in the hopes that they might release v5 that would upgrade postcss to a later version (currently pinned to 7.0.39).
To prevent the vulnerable packages (postcss < 8.2.13 and node-forge < 1,0) from being on my production server, I have used yarn install --production since the impacted packages are devDependencies.
Im still getting
When running
npx mix -p