fix(deps): update dependency immutable to v5 [security]#66
Merged
Conversation
| datasource | package | from | to | | ---------- | --------- | ----- | ----- | | npm | immutable | 4.3.8 | 5.1.5 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^4.3.7→^5.0.0GitHub Vulnerability Alerts
CVE-2026-29063
Impact
What kind of vulnerability is it? Who is impacted?
A Prototype Pollution is possible in immutable via the mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject() APIs.
Affected APIs
mergeDeep(target, source)ObjectSeq, assignsmerged[key]mergeDeepWith(merger, target, source)merge(target, source)Map.toJS()object[k] = vintoObject()with no__proto__guardMap.toObject()toObject()implementationMap.mergeDeep(source)Patches
Has the problem been patched? What versions should users upgrade to?
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
Proof of Concept
PoC 1 — mergeDeep privilege escalation
PoC 2 — All affected APIs
Verified output against immutable@5.1.4:
References
Are there any links users can visit to find out more?
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NRelease Notes
immutable-js/immutable-js (immutable)
v5.1.5Compare Source
v5.1.4Compare Source
Documentation
Internal
v5.1.3Compare Source
TypeScript
Documentation
There has been a huge amount of changes in the documentation, mainly migrate from an autogenerated documentation from .d.ts file, to a proper documentation in markdown.
The playground has been included on nearly all method examples.
We added a page about browser extensions too: https://immutable-js.com/browser-extension/
Internal
v5.1.2Compare Source
v5.1.1Compare Source
v5.1.0Compare Source
RetrievePath#2070 by @jdeniauInternal
v5.0.3Compare Source
v5.0.2Compare Source
v5.0.1Compare Source
v5.0.0Compare Source
Breaking changes
To sum up, the big change in 5.0 is a Typescript change related to
Mapthat is typed closer to the JS object. This is a huge change for TS users, but do not impact the runtime behavior. (see Improve TypeScript definition forMapfor more details)Other breaking changes are:
[BREAKING] Remove deprecated methods:
Released in 5.0.0-rc.1
Map.of('k', 'v'): useMap([ [ 'k', 'v' ] ])orMap({ k: 'v' })Collection.isIterable: useisIterabledirectlyCollection.isKeyed: useisKeyeddirectlyCollection.isIndexed: useisIndexeddirectlyCollection.isAssociative: useisAssociativedirectlyCollection.isOrdered: useisOrdereddirectly[BREAKING]
OrdererMapandOrderedSethashCode implementation has been fixedReleased in 5.0.0-rc.1
Fix issue implementation of
hashCodeforOrdererMapandOrderedSetwhere equal objects might not return the samehashCode.Changed in #2005
[BREAKING] Range function needs at least two defined parameters
Released in 5.0.0-beta.5
Range with
undefinedwould end in an infinite loop. Now, you need to define at least the start and end values.If you need an infinite range, you can use
Range(0, Infinity).Changed in #1967 by @jdeniau
[Minor BC break] Remove default export
Released in 5.0.0-beta.1
Immutable does not export a default object containing all it's API anymore.
As a drawback, you can not
immport Immutabledirectly:If you want the non-recommanded, but shorter migration path, you can do this:
[TypeScript Break] Improve TypeScript definition for
MapReleased in 5.0.0-beta.1
This was previously typed as
Map<string, string | number>and return type of
m.get('length')orm.get('inexistant')was typed asstring | number | undefined.This made
Mapreally unusable with TypeScript.Now the Map is typed like this:
and the return type of
m.get('length')is typed asnumber.The return of
m.get('inexistant')throw the TypeScript error:If you want to keep the old definition
This is a minor BC for TS users, so if you want to keep the old definition, you can declare you Map like this:
If you need to type the Map with a larger definition
You might want to declare a wider definition, you can type your Map like this:
Keep in mind that the
MapOfwill try to be consistant with the simple TypeScript object, so you can not do this:Like a simple object, it will only work if the type is forced:
Are all
Mapmethods implemented ?For now, only
get,getIn,set,update,delete,remove,toJS,toJSONmethods are implemented. All other methods will fallback to the basicMapdefinition. Other method definition will be added later, but as some might be really complex, we prefer the progressive enhancement on the most used functions.Fixes
Internal
Special thanks to @arnfaldur that migrated every type tests to tsd just before that.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.