CVE-2026-25641: Property Key Type Confusion Toctou

Property key $KEY is used in a hasOwnProperty() security check and then in a computed property access without first coercing it to a string primitive. A non-primitive $KEY implementing toString() or [Symbol.toPrimitive] can return different values on successive evaluations — an allowed name during the hasOwnProperty check and a dangerous key ('__proto__', 'c

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-25641-property-key-type-confusion-toctou --engine opengrep

Description

Property key $KEY is used in a hasOwnProperty() security check and then in a computed property access without first coercing it to a string primitive. A non-primitive $KEY implementing toString() or [Symbol.toPrimitive] can return different values on successive evaluations — an allowed name during the hasOwnProperty check and a dangerous key ('__proto__', 'c