-
Notifications
You must be signed in to change notification settings - Fork 383
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
Update handlebars package due to a Security Vulnerability #267
Conversation
Update handlebars package due to a Security Vulnerability
Explanation The handlebars package is vulnerable to Prototype Pollution resulting from Improper Input Validation. Multiple functions in multiple files, as listed below, do not disallow the calling of helperMissing and blockHelperMissing helpers directly. This can enable an attacker to conduct remote code execution attacks by calling methods from object prototypes which should otherwise not have been called. Vulnerable File(s) and Function(s) package/lib/handlebars/compiler/javascript-compiler.js package/dist/amd/handlebars/compiler/javascript-compiler.js package/dist/cjs/handlebars/compiler/javascript-compiler.js package/lib/handlebars/helpers/runtime.js invokePartialWrapper() invokePartialWrapper() invokePartialWrapper() invokePartialWrapper() invokePartialWrapper() invokePartialWrapper() invokePartialWrapper() package/dist/handlebars.runtime.amd.min.js package/dist/handlebars.min.js package/dist/handlebars.amd.min.js |
@sahat could you merge this PR to remove the security vulnerability? |
@sahat please merge this PR |
Any update on this? We currently rely on this package and we are unable to pass the security checklist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should fix the issue without side effects; Changes on the handlebars side are non-breaking and tested.
@adelriosantiago Could you please update this MR to reflect the new advisories? https://www.npmjs.com/advisories/1300 Remediation |
package.json
Outdated
@@ -26,7 +26,7 @@ | |||
"dependencies": { | |||
"glob": "^7.1.3", | |||
"graceful-fs": "^4.1.2", | |||
"handlebars": "^4.1.2", | |||
"handlebars": "^4.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handlebars ^4.5.1 could still be vulnerable to Arbitrary Code Execution and Prototype Pollution. Please upgrade this to ^4.5.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, updated the PR, thanks for the observation.
As @milo526 suggested: Handlebars ^4.5.1 could still be vulnerable to Arbitrary Code Execution and Prototype Pollution. Please upgrade this to ^4.5.3
I have finally gotten around to moving this repo to https://github.com/express-handlebars/express-handlebars/ any new development will be done on that repo. handlebars is up to date in v4.0.0 so this can be closed. |
Ok, closing this. Thanks! |
Update handlebars package due to a Security Vulnerability