Intel

AIKIDO-2026-68991

viperjs is vulnerable to Denial of Service

Denial of ServiceGHSA-6976-qm5m-7mcj Published Aug 10, 2026

75

High Risk

This Affects:

RUSTviperjs
0.2.0 - 0.2.1
Fixed in 0.2.2
Are you affected? Scan for Free

TL;DR

Affected versions of viperjs panic when dividing by a BigInt whose magnitude lands exactly on the engine's internal limb ceiling. During normalisation, a left-shift that needs one limb past MAX_LIMBS is refused and then discarded with unwrap_or_default, leaving an empty divisor; indexing divisor[n - 1] then panics. The same root cause also returns wrong results without error: remainder can report 0n instead of the true value, and String() of such a magnitude yields "0". Because viperjs is intended to evaluate untrusted script, a short piece of source can crash the embedder's process. Version 0.2.2 fixes the shift bounds, propagates size refusals as RangeError, and makes oversized digit conversion throw rather than answer incorrectly.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application embeds viperjs to evaluate untrusted JavaScript.

Background info

viperjs is vulnerable to Denial of Service in versions 0.2.0 - 0.2.1.

How to fix this

Upgrade the viperjs library to the patch version.