[GHSA-4fr2-j4g9-mppf] Prototype Pollution in deephas #5039
+2
−5
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.
Updates
Comments
The advisory claiming a prototype pollution vulnerability in deephas versions 1.0.0 through 1.0.5 is a false positive. While the link to the original advisory is broken, I’ve traced the data flow in the codebase and reviewed the maintainer’s test suite. Below is my analysis, supported by the provided proof-of-concept:
Upon analyzing the relevant code block, the issue appears to be misunderstood:
The path proto.isAdmin is serialized into properties and processed as follows:
1. On Line 4, the reduce function fails to reference the prototype, meaning no link to Object.prototype is established.
2. As a result, the statement test[last] = val on Line 5 creates the property isAdmin on the object test, but only as a direct property. It does not modify the global prototype.
Since the prototype reference fails, no pollution occurs, and the proof-of-concept does not achieve the expected behavior.
Given this analysis, I kindly request that this advisory be removed from the database to prevent unnecessary confusion.