CVE-2021-23543
JavaScript vulnerability analysis and mitigation

Overview

The realms-shim package, a shim implementation of the Realm API Proposal, contains a Sandbox Bypass vulnerability (CVE-2021-23543) that affects all versions. This vulnerability was discovered by Cristian-Alexandru Staicu and Abdullah Alhamdan, disclosed on December 6, 2021, and published on January 7, 2022 (Snyk Advisory).

Technical details

The vulnerability allows attackers to perform a Sandbox Bypass through a Prototype Pollution attack vector. The issue occurs when properties can be injected into existing JavaScript language construct prototypes, such as objects, by manipulating magical attributes like proto, constructor, and prototype. This manipulation can lead to the pollution of JavaScript application object prototypes of the base object, affecting all JavaScript objects through the prototype chain (Snyk Advisory).

Impact

The successful exploitation of this vulnerability can result in multiple severe impacts: denial of service by triggering JavaScript exceptions, tampering with application source code to force specific code paths, and potential remote code execution. The vulnerability has received a CVSS v3.1 base score of 9.8 CRITICAL, indicating high severity across confidentiality, integrity, and availability (Snyk Advisory).

Mitigation and workarounds

There is no fixed version available for realms-shim. The package has been deprecated with the message that TC39 has taken Realms in a new direction (ShadowRealm) and the security properties of the realms-shim have not been maintained. Recommended mitigations include freezing the prototype using Object.freeze(Object.prototype), requiring schema validation of JSON input, avoiding unsafe recursive merge functions, and considering the use of objects without prototypes or using Map instead of Object (NPM Package, Snyk Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65959HIGH8.7
  • JavaScriptJavaScript
  • open-webui
NoYesDec 04, 2025
CVE-2025-66032HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesDec 03, 2025
CVE-2025-65945HIGH7.5
  • JavaScriptJavaScript
  • jws
NoYesDec 04, 2025
CVE-2025-66404MEDIUM6.4
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesDec 03, 2025
CVE-2025-66479LOW1.8
  • JavaScriptJavaScript
  • @anthropic-ai/sandbox-runtime
NoYesDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management