Skip to content

fix: skip inherited keys when enumerating query operators - #277

Open
sheanming-agmo wants to merge 1 commit into
crcn:masterfrom
sheanming-agmo:feature/20260910-prototypePollution
Open

sheanming-agmo wants to merge 1 commit into
crcn:masterfrom
sheanming-agmo:feature/20260910-prototypePollution

Conversation

@sheanming-agmo

Copy link
Copy Markdown

Query keys were enumerated with for..in, which walks the prototype chain, so a polluted Object.prototype (e.g. Object.prototype.$where) could inject operators into any query - even sift({}) - and, via a string $where, reach new Function. Guard both enumeration loops with an own-property check.

Fixes CVE-2026-85625.

Query keys were enumerated with `for..in`, which walks the prototype
chain, so a polluted `Object.prototype` (e.g. `Object.prototype.$where`)
could inject operators into any query - even `sift({})` - and, via a
string `$where`, reach `new Function`. Guard both enumeration loops with
an own-property check.

Fixes CVE-2026-85625.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sheanming-agmo

Copy link
Copy Markdown
Author

#276

@huineng

huineng commented Sep 15, 2026

Copy link
Copy Markdown

is there someone who can merge this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants