{"answers":{"affected":"1 open source package ship an affected version, including viperjs.","exploited":"There is no known exploitation of RUSTSEC-2026-0236 in the wild and no public exploit code.","fix":"Upgrade viperjs to 0.2.2 or later.","what":"RUSTSEC-2026-0236 is a denial of service vulnerability in viperjs, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0236 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0236 is a denial of service vulnerability in viperjs, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of RUSTSEC-2026-0236 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- viperjs (crates.io): affected from 0.0.0-0; fixed in 0.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/RUSTSEC-2026-0236/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0236/index.md)","id":"RUSTSEC-2026-0236","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0236/index.md","name":"RUSTSEC-2026-0236","record":{"aliases":["GHSA-6976-qm5m-7mcj"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript engine library","requires_auth":"none","summary":"A crafted BigInt division in viperjs causes a panic leading to denial of service, while related operations silently return incorrect results.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`viperjs` is a JavaScript engine intended to run untrusted script inside a host application, so\nscript text is data rather than a trusted caller and a panic reachable from script is a denial of\nservice in the embedder's process.\n\nA divisor whose magnitude lands exactly on the engine's internal limb ceiling reaches an\nout-of-bounds index. On every released version up to and including 0.2.1:\n\n```js\nconst d = (1n \u003c\u003c 33554399n) * 2n;\n1n / d;   // panic: index out of bounds\n```\n\nTwo further operations on the same value returned wrong results without raising anything, which\nis the more dangerous half for an embedder that acts on the answer:\n\n```js\nd % 7n;      // 0n  — the true remainder is 1n\nString(d);   // \"0\"\n```\n\n## Cause\n\nThe left-shift helper reserved one limb for the bits a shift may push past the top of the\nmagnitude, measured *that* width against the size ceiling, and then trimmed the reserved limb away\nagain — so a magnitude landing exactly on the ceiling was refused on account of room it does not\nkeep. The division treated that refusal as unreachable and discarded it with `unwrap_or_default`,\nleaving an empty divisor magnitude; the subsequent `divisor[n - 1]` is then an index of\n`usize::MAX`.\n\nThe crate is `#![forbid(unsafe_code)]`, so this is a panic and not memory unsafety.\n\n## Remediation\n\nUpgrade to 0.2.2, in which all three behaviours are fixed: both divisions now produce correct\nresults, and `String()` of a magnitude beyond what the engine can divide raises a `RangeError`\nrather than producing `\"0\"` — ECMA-262 §6.1.4 requires an implementation that imposes a limit to\nthrow rather than answer something else.\n\nThere is no workaround short of upgrading; the values are reachable from any script the embedder\nevaluates.\n\nReported by [@Zniece](https://github.com/Zniece).","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"A `BigInt` division panics, and two neighbouring operations answer wrongly in silence","id":"RUSTSEC-2026-0236","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.2.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"viperjs","purl":"pkg:cargo/viperjs","source":"RUSTSEC-2026-0236"}],"products":null,"published":"2026-08-06","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A crafted BigInt division in viperjs causes a panic leading to denial of service, while related operations silently return incorrect results.","url":"https://insights.sbomify.com/RUSTSEC-2026-0236/"}