CVE-2020-8823: Cross-site scripting in SocksJS-node
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.72308%
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:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
sockjs | npm | < 0.3.0 | 0.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in the htmlfile transport handler which directly embedded the 'c' callback parameter into HTML output without proper sanitization. While the provided GitHub commit shows routing changes, the actual vulnerability is documented in external references showing:
- The htmlfile.js transport lacked input validation for the callback parameter
- The function wrote user-controlled input directly into the response via
iframe_template.replace(/{{ callback }}/g, callback)
- The patched version added a regex check for allowed characters in the callback parameter This function would appear in runtime profiles when handling /htmlfile requests with malicious 'c' parameters.