Technical impact
Echo is a Go web framework that offers JSONP support via the Context.JSONP and Context.JSONPBlob methods. In versions before 4.16.0 and 5.4.0, the callback value supplied by a client is concatenated into a JavaScript response without validation or escaping. If an attacker can control the callback parameter, they can craft a response that contains executable JavaScript, resulting in reflected cross‑site scripting. The vulnerability is a classic injection flaw listed as CWE‑79 and requires only a crafted HTTP request with a malicious callback.
Affected Systems
The issue affects the labstack:echo framework in all versions prior to 4.16.0 and 5.4.0. Any application built with Echo that exposes JSONP endpoints and allows user input to determine the callback name is vulnerable. Deployments using older Echo versions that include the vulnerable JSONP routes inherit the flaw.
Risk and Exploitability
The CVSS score of 6.1 indicates medium severity. The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, suggesting no widespread known exploit yet. Exploitation requires only a crafted request to a JSONP endpoint where the attacker can set the callback. Once the malicious script executes, it can steal cookies, session tokens, or perform other client‑side attacks. The risk is significant for exposed JSONP routes in publicly accessible applications.
Github GHSA