CVE-2025-32792 ses's global contour bindings leak into Compartment lexical scope
The ses library leaks top-level lexical bindings into third-party code compartments, allowing attackers to read sensitive variables.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-32792?
CVE-2025-32792 is a high-severity vulnerability in endojs endo, published on 18 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
SES safely executes third-party JavaScript 'strict' mode programs in compartments that have no excess authority in their global scope. Prior to version 1.12.0, web pages and web extensions using `ses` and the Compartment API to evaluate third-party code in an isolated execution environment that have also elsewhere used `const`, `let`, and `class` bindings in the top-level scope of a `<script>` tag will have inadvertently revealed these bindings in the lexical scope of third-party code. This issue has been patched in version 1.12.0. Workarounds for this issue involve either avoiding top-level `let`, `const`, or `class` bindings in `<script>` tags, or change these to `var` bindings to be reflected on `globalThis`.
Weakness: CWE-497
Which versions are affected by CVE-2025-32792?
2 open source packages ship an affected version, including ses.
| Package | Affected | Fixed in |
|---|---|---|
ses npm | All versions | 1.12.0 |
ses npm | All versions | 1.12.0 |
How do I fix CVE-2025-32792?
Upgrade ses to 1.12.0 or later.
Is CVE-2025-32792 being exploited?
There is no known exploitation of CVE-2025-32792 in the wild and no public exploit code.
Sources
Also known as GHSA-h9w6-f932-gq62.