CVE-2026-78654: Prototype Pollution Reflect Has Deep Merge

Detected `Reflect.has` used inside a recursive object merge function. `Reflect.has` traverses the prototype chain, which allows special keys like `__proto__` to be recognized as existing properties and traversed recursively, leading to Prototype Pollution. Use `Object.hasOwn()` and reject keys such as `__proto__`, `constructor`, and `prototype`.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0TS
greprules fetch cve-2026-78654-prototype-pollution-reflect-has-deep-merge --engine opengrep

Description

Detected `Reflect.has` used inside a recursive object merge function. `Reflect.has` traverses the prototype chain, which allows special keys like `__proto__` to be recognized as existing properties and traversed recursively, leading to Prototype Pollution. Use `Object.hasOwn()` and reject keys such as `__proto__`, `constructor`, and `prototype`.