CVE-2026-118652

Echo: Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob

Published Oct 28, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Context.JSONP and Context.JSONPBlob concatenate an unvalidated callback value into a JavaScript response. A route that passes attacker-controlled input as the callback can return executable script syntax, allowing reflected cross-site scripting when a user loads the crafted response. The vulnerable jsonPBlob path performs no callback validation or escaping, and exploitation requires an application route that exposes attacker control over the callback argument. This issue is fixed in 4.16.0 and 5.4.0.

Analysis

AI-generated

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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Echo to version 4.16.0 or 5.4.0, which sanitizes the callback parameter.
  • If an upgrade is not feasible, disable or remove JSONP functionality from the application.
  • If JSONP must remain, implement strict validation or whitelisting of the callback name to ensure it contains only safe characters.

Generated by OpenCVE AI on October 28, 2026 at 20:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-h9g5-28mm-hx3g Echo vulnerable to Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo
Type Values Removed Values Added
Description Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Context.JSONP and Context.JSONPBlob concatenate an unvalidated callback value into a JavaScript response. A route that passes attacker-controlled input as the callback can return executable script syntax, allowing reflected cross-site scripting when a user loads the crafted response. The vulnerable jsonPBlob path performs no callback validation or escaping, and exploitation requires an application route that exposes attacker control over the callback argument. This issue is fixed in 4.16.0 and 5.4.0.
Title Echo: Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 1:27 PM
Reserved
Oct 28, 2026, 5:25 PM
Status
Undergoing Analysis
Published
Oct 28, 2026, 8:17 PM
Modified
Nov 3, 2026, 2:17 PM
Severity
Moderate
Public date
Oct 28, 2026, 7:35 PM