Summary
A crafted WebTransport session ID such as __proto__ can be resolved via an inherited property of the clients object in affected Engine.IO servers, leading to a runtime TypeError.
When WebTransport is enabled, this malformed identifier can be sent during upgrade handling to trigger a denial of service, making the server unavailable until it recovers.
Affected context
This vulnerability occurs in Socket.IO deployments using Engine.IO server versions 6.5.0 up to, but not including, 6.6.7 with WebTransport support turned on.
It manifests during the WebTransport upgrade phase, where the server processes client-supplied session identifiers.
In environments where session IDs are accepted and resolved without defensive checks against special JavaScript object keys, crafted values can interact with inherited properties and cause unexpected type errors.
Exploit preconditions
- Attack surface: Public or internal Engine.IO endpoints that allow WebTransport upgrades.
- Required access: Ability to initiate or influence WebTransport upgrade requests and supply arbitrary session IDs (e.g., unauthenticated network access to the Engine.IO server).
- Trigger point: Processing of the session ID during WebTransport upgrade, when the server consults the
clientsobject to look up the associated connection. - Why exploitation is possible: The implementation trusts the incoming session ID, allowing values like
__proto__to resolve through JavaScript's prototype chain on theclientsobject, resulting in a TypeError that can crash or disrupt the server.
Why this happens
The root cause is insufficient input validation for session identifiers in the WebTransport upgrade path.
The Engine.IO server uses an object (clients) keyed by session IDs, but does not guard against reserved or special property names that are part of JavaScript's prototype chain.
When an attacker supplies a value such as __proto__, the lookup traverses inherited properties instead of only treating keys as opaque identifiers.
This maps to CWE-20: Improper Input Validation, where the software fails to reject or sanitize inputs that can alter object behavior or cause unexpected type mismatches.
Potential impact
- Engine.IO server processes may crash or throw unhandled exceptions.
- Temporary denial of service for Socket.IO applications relying on WebTransport.
- Disruption of active client connections and ongoing real-time communications.
- Potential cascading availability issues in systems that depend heavily on Engine.IO for critical messaging.
General mitigation guidance
Effective mitigation focuses on tightening validation around identifiers used as object keys and isolating internal data structures from untrusted input.
Defensive patterns include:
- Treating session IDs as opaque values and rejecting reserved JavaScript property names (e.g.,
__proto__,constructor,prototype) and other dangerous keys. - Normalizing or mapping incoming identifiers to safe key spaces that cannot collide with prototype properties.
- Enforcing strict type checks on lookup results and handling unexpected values gracefully instead of allowing unhandled exceptions.
- Designing server components so that failures in one transport mechanism degrade gracefully rather than causing global denial of service.
How teams detect issues like this
Detection often relies on a combination of runtime monitoring and code-level review:
- Static analysis rules that flag use of unvalidated client-supplied strings as object property keys or indices.
- Code reviews focused on identifier handling in transport upgrade logic, looking for direct usage of untrusted values in JavaScript objects without guarding against prototype pollution.
- Application performance and error monitoring to detect spikes in TypeErrors or crashes related to WebTransport upgrade handling.
- Policy-based checks or automated tools that enforce safe object access patterns and prohibit use of special property names originating from untrusted sources.

