CVE-2026-2739: Bignum Zero Length State Corruption

A BigNumber or similar structure applies a bitwise mask to an array of components based on length, but fails to account for the state where length becomes 0. This corrupts the instance invariants, causing operations like `isZero()` to fail and resulting in infinite loops.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-2739-bignum-zero-length-state-corruption --engine opengrep

Description

A BigNumber or similar structure applies a bitwise mask to an array of components based on length, but fails to account for the state where length becomes 0. This corrupts the instance invariants, causing operations like `isZero()` to fail and resulting in infinite loops.