CVE-2026-118652: Echo vulnerable to Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob
The Context.JSONP, Context.JSONPBlob, and internal jsonPBlob helper in context.go directly concatenate the caller-supplied callback parameter into a JavaScript response without any validation, escaping, or allow-listing.
This creates a high-impact reflected XSS that can be triggered by any route passing attacker-controlled data (query string, form, header, path param, etc.) into the callback.
Present in current master and v5.1.0 (latest release).
References
- github.com/advisories/GHSA-h9g5-28mm-hx3g
- github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1
- github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af
- github.com/labstack/echo/releases/tag/v4.16.0
- github.com/labstack/echo/releases/tag/v5.4.0
- github.com/labstack/echo/security/advisories/GHSA-h9g5-28mm-hx3g
- nvd.nist.gov/vuln/detail/CVE-2026-118652
Code Behaviors & Features
Detect and mitigate CVE-2026-118652 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →