Vulnerability DatabaseRUSTSEC-2026-0236

RUSTSEC-2026-0236
Rust vulnerability analysis and mitigation

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:

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:

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.


SourceNVD

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-mc9m-6fm9-pghcMEDIUM6.9
  • Python logoPython
  • zoo-kcl
NoYesAug 20, 2026
GHSA-jgvr-6x5w-hx5wMEDIUM6.9
  • Python logoPython
  • zoo-kcl
NoYesAug 20, 2026
CVE-2026-54136MEDIUM5.1
  • Rust logoRust
  • windmill-api
NoYesAug 20, 2026
RUSTSEC-2026-0266NONEN/A
  • Rust logoRust
  • internment
NoYesAug 20, 2026
RUSTSEC-2026-0265NONEN/A
  • Rust logoRust
  • proc-macro1
NoNoAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management