deps(prod): update dependency eta to v2 [security] #432
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.12.1
->^2.0.0
GitHub Vulnerability Alerts
CVE-2023-23630
Impact
XSS attack - anyone using the Express API is impacted
Patches
The problem has been resolved. Users should upgrade to version 2.0.0.
Workarounds
Don't pass user supplied data directly to
res.renderFile
.References
Are there any links users can visit to find out more?
See https://github.com/eta-dev/eta/releases/tag/v2.0.0
CVE-2022-25967
Versions of the package eta before 2.0.0 are vulnerable to Remote Code Execution (RCE) by overwriting template engine configuration variables with view options received from The Express render API. Note: This is exploitable only for users who are rendering templates with user-defined data.
Release Notes
eta-dev/eta (eta)
v2.0.0
: Version 2.0.0Compare Source
TL;DR
This commit includes fixes for several security vulnerabilities. Specifically, in version 1, Eta merged the
data
parameter ofrenderFile()
intoconfig
-- meaning that malicious untrusted user data, passed through in a very specific way, could potentially modify the values ofvarName
,include
,includeFile
, anduseWith
, and thus insert arbitrary code into user template functions.With this release, such behavior is removed. Configuration cannot be passed through the
data
parameter toeta.renderFile()
.Most users will be able to update from version 1 to version 2 without changing any code. All users are encouraged to update as soon as possible.
Practical Implications
renderFile
explicitly, rather than merged with thedata
parameterapp.set()
to modifyviews
andview cache
will no longer change Eta's configuration ofviews
andcache
.views
andview cache
options under the hood, users should configure both Eta and Express with desired values (example below)settings["view options"]
propertyExample Code Changes
Commits
5651392
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.