Benign javascript Download

weavedb-contracts 0.45.2

Amplification chr() payload suffixReferences the toString conversion method

Also flagged by osv (MAL-2026-5192: Malicious code in weavedb-contracts (npm)) +2 more.

Evidence

References the toString conversion method lines 31–40
31:3… this.name = name
32 this.argument = argument
33 this.stack = this.toString()
34})
35
⋯5 lines
Calls JavaScript toString conversion method lines 89–100
89:41… .errors)
90 }
91}
92
93function stringizer(v, i) {
94 return i + ": " + v.toString() + "\n"
95}
96ValidatorResult.prototype.toString = function toString(res) {
⋯4 lines
JavaScript comment contains a URL lines 218–226
218:197… {0,3}|\*)?)*\})*/iu,
219
220 // 7.3.7. JSON Pointers
221 "json-pointer": /^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,
222 "relative-json-pointer": /^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,
⋯4 lines
Calls a matcher in a conditional expression lines 286–299
286:6… That means this will use the name form for some illegal forms
287 if (!key.match(/[.\s\[\]]/) && !key.match(/^[\d]/)) {
288 return "." + key
289 }
290 if (key.match(/^\d+$/)) {
291 return "[" + key + "]"
292 }
293 return "[" + JSON.stringify(key) + "]"
294})
295
⋯4 lines
Chains multiple JavaScript string replacements lines 380–392
380:6… ts.objectGetPath = function objectGetPath(o, s) {
381 var parts = s.split("/").slice(1)
382 var k
383 while (typeof (k = parts.shift()) == "string") {
384 var n = decodeURIComponent(k.replace(/~0/, "~").replace(/~1/g, "/"))
385 if (!(n in o)) return
386 o = o[n]
⋯6 lines

Showing the top 5 files — 7 more files (31 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.