CVE-2020-7693: Improper Input Validation in SocksJS-Node
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.93425%
CWE
Published
4/13/2021
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:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
sockjs | npm | < 0.3.20 | 0.3.20 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper response handling in the fake_response function. The GitHub commit dd7e642 shows removal of a try-catch block that called res.end() after writing headers. This dual termination attempt (from fake_response and subsequent error handlers) caused stream write-after-end errors. The SockJS protocol validation failed to properly sanitize the Upgrade header, allowing attackers to force this code path via crafted websocket upgrade requests to invalid endpoints.