🛡️ RUSTSEC-2026-0236 — viperjs

⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

A BigInt division panics, and two neighbouring operations answer wrongly in silence

viperjs is a JavaScript engine intended to run untrusted script inside a host application, so

script text is data rather than a trusted caller and a panic reachable from script is a denial of

service in the embedder's process.

A divisor whose magnitude lands exactly on the engine's internal limb ceiling reaches an

out-of-bounds index. On every released version up to and including 0.2.1:

```js

const d = (1n << 33554399n) * 2n;

1n / d; // panic: index out of bounds

```

Two further operations on the same value returned wrong results without raising anything, which

is the more dangerous half for an embedder that acts on the answer:

```js

d % 7n; // 0n — the true remainder is 1n

String(d); // "0"

```

Cause

The left-shift helper reserved one limb for the bits a shift may push past the top of the

magnitude, measured *that* width against the size ceiling, and then trimmed the reserved limb away

again — so a magnitude landing exactly on the ceiling was refused on account of room it does not

keep. The division treated that refusal as unreachable and discarded it with unwrap_or_default,

leaving an empty divisor magnitude; the subsequent divisor[n - 1] is then an index of

usize::MAX.

The crate is #![forbid(unsafe_code)], so this is a panic and not memory unsafety.

Remediation

Upgrade to 0.2.2, in which all three behaviours are fixed: both divisions now produce correct

results, and String() of a magnitude beyond what the engine can divide raises a RangeError

rather than producing "0" — ECMA-262 §6.1.4 requires an implementation that imposes a limit to

throw rather than answer something else.

There is no workaround short of upgrading; the values are reachable from any script the embedder

evaluates.

Reported by [@Zniece](https://github.com/Zniece).

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

Affected software

RUSTSEC-2026-0236 is recorded against 1 package.

  • viperjs

Timeline and source

Published on 6 August 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

crates.io (Package)
rustsec.org (Advisory)
github.com (Advisory)
github.com (Web)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2026-08-06
Updated 2026-08-12
Modified 2026-08-06
Fix URL N/A

Affected Packages

Software From version Fixed in
viperjs

Free Vulnerability Check

Is your site affected by RUSTSEC-2026-0236?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against RUSTSEC-2026-0236 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.