@nyariv/sandboxjs@0.8.26

Javascript sandboxing library.

  • latest version

    0.9.2

  • latest non vulnerable version

  • first published

    6 years ago

  • latest version published

    8 hours ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @nyariv/sandboxjs package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Exposure of Resource to Wrong Sphere

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Exposure of Resource to Wrong Sphere in the New handler due to missing sanitization of both constructor arguments and return values. An attacker can access and modify internal interpreter objects, including scope variables outside the intended sandbox, by passing specially crafted arguments that leak references to protected objects. This is only exploitable if the host application reads the return value from the sandbox execution, which is the standard and documented usage pattern.

    How to fix Exposure of Resource to Wrong Sphere?

    Upgrade @nyariv/sandboxjs to version 0.8.36 or higher.

    <0.8.36
    • C
    Improperly Controlled Modification of Dynamically-Determined Object Attributes

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Improperly Controlled Modification of Dynamically-Determined Object Attributes through the constructor process. An attacker can modify host global objects and persist these changes across sandbox instances by invoking the exposed constructor with attacker-controlled payloads. This allows the attacker to inject arbitrary properties into shared global objects, potentially leading to the execution of malicious code or alteration of application logic when these mutated properties are later used by the host application.

    How to fix Improperly Controlled Modification of Dynamically-Determined Object Attributes?

    Upgrade @nyariv/sandboxjs to version 0.8.36 or higher.

    <0.8.36
    • M
    Uncontrolled Recursion

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Uncontrolled Recursion via the restOfExp function and the recursive call chain involving lispify and lispifyExpr. An attacker can cause the process to crash by supplying deeply nested expressions that trigger unbounded recursion.

    How to fix Uncontrolled Recursion?

    Upgrade @nyariv/sandboxjs to version 0.8.36 or higher.

    <0.8.36
    • L
    Race Condition

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Race Condition through the global currentTicks.current state shared between concurrent sandboxes. An attacker can consume excessive CPU resources and bypass execution quotas by manipulating the global tick state during timer handler execution in a multi-tenant environment.

    How to fix Race Condition?

    Upgrade @nyariv/sandboxjs to version 0.8.35 or higher.

    <0.8.35
    • H
    Arbitrary Code Injection

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the executor module. An attacker can execute arbitrary code by crafting input that allows them get to arrays containing Function() and escape the intended sandbox restrictions by invoking system-level commands.

    How to fix Arbitrary Code Injection?

    Upgrade @nyariv/sandboxjs to version 0.8.34 or higher.

    <0.8.34
    • C
    Prototype Pollution

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Prototype Pollution via the sandbox implements a protection mechanism using the isGlobal flag in the Prop class. An attacker can modify host built-in prototypes by laundering the isGlobal protection flag through array literal intermediaries, which allows persistent changes to host-side prototypes and may enable execution of arbitrary code by leveraging polluted properties in sensitive sinks.

    How to fix Prototype Pollution?

    Upgrade @nyariv/sandboxjs to version 0.8.31 or higher.

    <0.8.31
    • C
    Prototype Pollution

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Prototype Pollution due to unfiltered access to the Function constructor, via Array.prototype.at(). An attacker can execute arbitrary code on the underlying system by chaining calls to Object.values, Object.entries, and Array.prototype.at that bypass sanitization.

    How to fix Prototype Pollution?

    Upgrade @nyariv/sandboxjs to version 0.8.29 or higher.

    <0.8.29
    • C
    Prototype Pollution

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Prototype Pollution via prototypeAccess on a shadowed sandbox object's hasOwnProperty(). An attacker can execute arbitrary code on the underlying system by bypassing the prototype whiteliests.

    How to fix Prototype Pollution?

    Upgrade @nyariv/sandboxjs to version 0.8.29 or higher.

    <0.8.29
    • C
    Time-of-check Time-of-use (TOCTOU) Race Condition

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition in addOps() and other methods in executor.ts, which do not enforce the type of property keys. An attacker can execute arbitrary code on the underlying system by supplying a malicious object that passes key sanitization and subsequently manipulates key coercion to use an unsafe type when the key is accessed.

    How to fix Time-of-check Time-of-use (TOCTOU) Race Condition?

    Upgrade @nyariv/sandboxjs to version 0.8.29 or higher.

    <0.8.29
    • C
    Arbitrary Code Injection

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Arbitrary Code Injection by overriding the Map.prototype.has() method. An attacker can execute arbitrary code on the underlying operating system because Map is included in SAFE_PROTOYPES.

    Note: This is a remaining vulnerability that was not covered by the fix for CVE-2026-25142.

    How to fix Arbitrary Code Injection?

    Upgrade @nyariv/sandboxjs to version 0.8.29 or higher.

    <0.8.29
    • C
    Arbitrary Code Injection

    @nyariv/sandboxjs is a Javascript sandboxing library.

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the __lookupGetter__ function. An attacker can execute arbitrary code by bypassing prototype chain checks with function properties, and thereby escaping the sandbox environment.

    How to fix Arbitrary Code Injection?

    Upgrade @nyariv/sandboxjs to version 0.8.27 or higher.

    <0.8.27