Niedrig

Hardening of TypedArrays with non-canonical numeric property names in SES

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

Impact

What kind of vulnerability is it? Who is impacted?

In Hardened JavaScript, programs can harden objects to safely share objects with co-tenant programs without risk of these other programs tampering with their API surface. Hardening does not guarantee that objects are pure or immutable, so a hardened Map, for example is superficially tamper-proof, but any party holding a reference to the object can both read and write its contents. Based on this precedent, and because TypedArray instances cannot be frozen with Object.isFrozen, harden does not freeze TypedArrays and instead makes them non-extensible and makes all non-indexed properties non-writable and non-configurable. This is consistent with the treatment of Map because the indexed properties represent mutable content and non-indexed properties represent the API.

Due to a defect in harden, properties that have names that parse as numbers but are not the same as the canonical representation of those numbers, as in "+0" and "" which are both equivalent to their canonical number "0", remain writable after hardening.

Any program treating one of these properties as part of its API and relying on harden to prevent modifications would be vulnerable to an API pollution attack, affecting only instances shared by mutually suspicious parties.

Unlike a Map, a hardened TypedArray can only have numbers for content. Any program that is sharing hardened TypedArrays between co-tentant programs and relying on harden to only allow these programs to communicate exclusively by changing numbers within the bounds of the TypedArray, may inadvertently have arranged for a mechanism for a pair of third-parties to communicate arbitrary objects on these other properties.

Patches

Has the problem been patched? What versions should users upgrade to?

SES version 0.16.0 patches this issue, causing harden to recognize properties with non-canonical numeric representations and ensuring that these properties are non-configurable.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Users should avoid sharing TypedArrays between co-tenant programs and instead create wrapper objects that produce a read-only view of the underlying data. We allow harden to succeed for TypedArrays because the treatment is in fact consistent with the behavior of collections like Map, but all collections shared between co-tentant programs should probably be attenuated to either read- or write-only facets and probably close over only part of the content of the collection. However, the motivation for allowing TypedArrays to be hardened in practice is to allow certain legacy modules to function under Hardened JavaScript with LavaMoat, since they export TypedArrays, even though they would ideally export read-only facets of these.

References

Are there any links users can visit to find out more?

Not at this time.

For more information

If you have any questions or comments about this advisory:

Betroffene Software

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

PlattformPaketAnfällige VersionenBehoben in
npm-Paket ses < 0.16.0 0.16.0

Verweise

CVSS-Wert -
Schwäche (CWE)
-
Plattform
npm
Paket
ses
Veröffentlicht
20.10.2022
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-whpx-q3rq-w8jc - CC BY 4.0

Schwachstellenhistorie: ses

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.

Einträge insgesamt
4
Erste → letzte
10.2019 04.2025
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 2
  • Hoch 1
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 1
  6. 2024: 0
  7. 2025: 1
  8. 2026: 0
  1. Kritisch · 9.8 CVE-2023-39532 >= 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.17.1, >= 0.18.0, < 0.18.7 0.13.5, 0.14.5, 0.15.24, 0.16.1, 0.17.1, 0.18.7
  2. Hardening of TypedArrays with non-canonical numeric property names in SES dieser Eintrag
    Niedrig ghsa-whpx-q3rq-w8jc < 0.16.0 0.16.0
  3. Kritisch · 9.8 ghsa-6jg8-7333-554w < 0.6.3 0.6.3

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.