CVE-2018-21036:
Improper Input Validation in sails-hook-sockets
7.5
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
7/24/2020
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
sails-hook-sockets | npm | < 1.5.5 | 1.5.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper handling of empty pathnames in WebSocket requests. The commit 0533a48 explicitly fixes this by adding a fallback to '/' when url.parse() returns a null pathname. The affected code in ToReceiveIncomingSailsIOMsg (in lib/receive-incoming-sails-io-msg.js) directly processes incoming messages and constructs the request object. The lack of input validation for pathname before the patch made this function vulnerable to type errors when handling malformed requests.