The vulnerability is a Denial of Service in Cube Core, caused by an unhandled exception when processing a specially crafted WebSocket message. The analysis of the provided patches for version 1.4.2 reveals that the core of the vulnerability lies in the handling of 'unsubscribe' messages within the API gateway.
The commit 71c41a2326150c82f7d83e46ed14b00fd1fed72b is the key to understanding the vulnerability. It modifies the validation schema in packages/cubejs-api-gateway/src/ws/message-schema.ts to allow the messageId in an 'unsubscribe' message to be an integer, whereas previously only a string was accepted. This implies that sending an 'unsubscribe' message with an integer messageId would cause a validation error.
The vulnerable function is identified as SubscriptionServer.processMessage, which is the entry point for processing WebSocket messages. An unhandled exception from the validation logic within this function would propagate and crash the Node.js process, thus causing a denial of service. The added test case in packages/cubejs-api-gateway/test/ws/subscription-server.test.ts confirms that a numeric messageId is now a valid input.
The function LocalSubscriptionStore.unsubscribe was also modified to support the numeric messageId, indicating it is part of the vulnerable execution path.