Declaration of Variable with Unnecessarily Wide Scope Affecting ses package, versions <1.12.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.1% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-SES-9788070
  • published20 Apr 2025
  • disclosed18 Apr 2025
  • creditmingijunggrape

Introduced: 18 Apr 2025

NewCVE-2025-32792  (opens in a new tab)
CWE-1126  (opens in a new tab)

How to fix?

Upgrade ses to version 1.12.0 or higher.

Overview

ses is a secure runtime for running third-party code safely.

Affected versions of this package are vulnerable to Declaration of Variable with Unnecessarily Wide Scope when using the Compartment API. If there are const, let, or class bindings in the top-level scope of a <script> tag, they are leaked into the global scope and can be accessed outside the isolated execution environment.

Workaround

This vulnerability can be mitigated by changing the vulnerable top-level bindings to var bindings, to be reflected on globalThis.

References

CVSS Base Scores

version 4.0
version 3.1