Skip to content

fix: Revert "prevent prototype pollution via constructor.prototype ac…#1271

Merged
mweststrate merged 1 commit into
mainfrom
revert-prototype-fix
Jul 16, 2026
Merged

fix: Revert "prevent prototype pollution via constructor.prototype ac…#1271
mweststrate merged 1 commit into
mainfrom
revert-prototype-fix

Conversation

@mweststrate

Copy link
Copy Markdown
Collaborator

…cess (CVE-2026-XXXX) (#1259)"

This reverts commit 48fc378. This fixes #1266 and #1268, #1265 while the security reported could not find a reasonable way to show the designated fixes was closing a real vulnerability, nor could I think of anything.

…cess (CVE-2026-XXXX) (#1259)"

This reverts commit 48fc378.
This fixes #1266 and #1268, #1265 while the security reported could not find a reasonable way to show the designated fixes was closing a real vulnerability, nor could I think of anything.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29522884378

Coverage decreased (-0.4%) to 45.455%

Details

  • Coverage decreased (-0.4%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4474
Covered Lines: 1702
Line Coverage: 38.04%
Relevant Branches: 696
Covered Branches: 648
Branch Coverage: 93.1%
Branches in Coverage %: Yes
Coverage Strength: 1848.29 hits per line

💛 - Coveralls

@mweststrate
mweststrate merged commit 4d3d6ff into main Jul 16, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 11.1.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

jonatankruszewski added a commit to jonatankruszewski/immer that referenced this pull request Jul 20, 2026
Drafts must stay safe for ecosystem introspection idioms: lodash's
isPrototype (used by isEmpty/isEqual/isPlainObject) reads
value.constructor.prototype, and fast-deep-equal compares constructor
identity. The guard reverted in immerjs#1271 broke these (immerjs#1265, immerjs#1266, immerjs#1268)
while its tests still passed, because try/catch made a crash and a
successful block indistinguishable.

These tests assert observable behavior directly, so they fail on
11.1.9-11.1.11 (verified: constructor.prototype throws, constructor
identity and 'in' checks break, writes to own keys named prototype are
dropped) and pass on main. setPrototypeOf remains forbidden; the
applyPatches-layer pollution guards in patch.js are untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression when comparing equality using fast-deep-equal

2 participants