This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Fixed bypass for prototype pollution in baseExtend #17086
Closed
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.
By blocking
__proto__
,prototype
, andconstructor
on deep merging, this commit prevents theObject
prototype from being polluted.There is already mitigation for prototype pollution on #16913, but it only blocks the
__proto__
key and it's bypassable using theprototype
andconstructor
keys. This commit fixes the issue and completely mitigate the prototype pollution issue on deepMerge.PoC for bypassing the current fix:
AngularJS is in LTS mode
We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.
Does this PR fix a regression since 1.7.0, a security flaw, or a problem caused by a new browser version?
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Just extended the old fix.
Does this PR introduce a breaking change?
No breaking changes introduced.
Please check if the PR fulfills these requirements
The commit message follows our guidelines
Fix/Feature: Docs have been added/updated
Fix/Feature: Tests have been added; existing tests pass
Other information: