CVE-2020-8823
JavaScript vulnerability analysis and mitigation

Overview

SockJS before version 0.3.0 contains a Reflected Cross-Site Scripting (XSS) vulnerability in the htmlfile transport component (CVE-2020-8823). The vulnerability specifically exists in the lib/transport/htmlfile.js file, where the htmlfile function fails to properly validate the 'c' (callback) parameter (GitHub XSS, CVE Details).

Technical details

The vulnerability exists in the htmlfile function within lib/transport/htmlfile.js where there is no validation for non-alphanumeric symbols in the callback parameter. The function accepts input through the 'c' or 'callback' query parameters without proper sanitization, allowing for potential XSS payload injection. Later versions fixed this by implementing a regular expression check that only allows alphanumeric characters, hyphens, underscores, and periods in the callback parameter (GitHub XSS).

Impact

If exploited, this vulnerability allows attackers to execute arbitrary JavaScript code in the context of the victim's browser session through a specially crafted URL. This could lead to theft of sensitive information, session hijacking, or other client-side attacks (GitHub XSS).

Mitigation and workarounds

The vulnerability has been fixed in newer versions of the library by implementing proper input validation. The fix includes a regular expression check (/a-zA-Z0-9-_./test(callback)) that validates the callback parameter to only allow alphanumeric characters and specific special characters. Users should upgrade to a version that includes this security fix (GitHub XSS).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23947CRITICAL9.3
  • JavaScriptJavaScript
  • @orval/core
NoYesJan 20, 2026
CVE-2026-23950HIGH8.8
  • JavaScriptJavaScript
  • grafana-graphite
NoYesJan 20, 2026
CVE-2026-22037HIGH8.4
  • JavaScriptJavaScript
  • @fastify/express
NoYesJan 19, 2026
CVE-2026-23522LOW3.7
  • JavaScriptJavaScript
  • @lobehub/chat
NoNoJan 19, 2026
CVE-2025-66803LOW1.7
  • JavaScriptJavaScript
  • @hotwired/turbo
NoYesJan 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management