# CVE-2023-39532: Endo SES dynamic import and spread operator sandbox escape

Source: https://junglewise.ai/threats/cve-2023-39532-endo-ses-dynamic-import-and-spread-operator-sandbox-escape  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-08-09. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2023-39532 · Severity: low · CVSS 3.1 · Published 2023-08-09

SES is a JavaScript sandbox library that confines guest code running inside isolated Compartments. A vulnerability in its import filtering allows guest code to bypass sandbox restrictions using the spread operator combined with dynamic import (e.g., `{...import('module')}`), enabling attackers to exfiltrate sensitive data or execute arbitrary code from the host environment depending on the deployment context.

Technologies: [ses (npm)](https://junglewise.ai/threats/technologies/ses). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2023-39532 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-39532 being exploited in the wild.

**How severe is CVE-2023-39532?** Low severity, with a CVSS score of 3.1, published 9 August 2023.

**Which products and versions are affected?** ses (npm) SEMVER:introduced=0.13.0,fixed=0.13.5.

**Is there a fix for CVE-2023-39532?** Yes. ses (npm): upgrade to 0.13.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-39532 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2023-39532?** Check whether you run ses (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- ses (npm): upgrade to 0.13.5 or later

  ```sh
  npm install ses@0.13.5
  ```


## Technical details

SES uses a regular expression pattern to block dynamic import expressions and prevent guest code from accessing the host's module system. The original pattern `(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))` failed to detect the spread operator (`...`) syntax, allowing guest code to bypass the filter using constructs like `{...import('module')}`. An attacker with no initial endowments can access the host's dynamic import capability through this vector. On the web, exploitation enables arbitrary HTTP requests and potential code execution (unless blocked by Content-Security-Policy). In Node.js environments, this provides a direct path to arbitrary code execution via data URL imports. The fix adds the spread operator to the regex pattern: `(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))`. Patches are available for all affected 0.x version trains (0.13.5, 0.14.5, 0.15.24, 0.16.1, 0.17.1, 0.18.7 and later).

## Affected products

- Endo SES >=0.13.0 <0.13.5, >=0.14.0 <0.14.5, >=0.15.0 <0.15.24, >=0.16.0 <0.16.1, 0.17.0, >=0.18.0 <0.18.7

## Identifiers

- CVE-2023-39532
- GHSA-9c4h-3f7h-322r

## Timeline

- 2023-08-09: disclosed
- 2023-08-09: patched

## References

- [https://github.com/endojs/endo/security/advisories/GHSA-9c4h-3f7h-322r](https://github.com/endojs/endo/security/advisories/GHSA-9c4h-3f7h-322r)

## Related threats

- [ses library variable scope leakage in Compartment isolation](https://junglewise.ai/threats/cve-2025-32792-ses-library-variable-scope-leakage-in-compartment-isolation)
- [SES TypedArray hardening bypass with non-canonical numeric properties](https://junglewise.ai/threats/ses-typedarray-hardening-bypass-with-non-canonical-numeric-properties-cd848030)
- [realms-shim sandbox breakout via Reflect.construct](https://junglewise.ai/threats/realms-shim-sandbox-breakout-via-reflect-construct-b4a099b5)
