CVE-2026-118652
Echo: Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob
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.
Fixes and workarounds
Fix
github.com/labstack/echo/v5 (Go): OSV reports a fixed version 5.4.0. Check the advisory for supported release branches.
Source: OSV GHSA-h9g5-28mm-hx3gFix
github.com/labstack/echo/v4 (Go): OSV reports a fixed version 4.16.0. Check the advisory for supported release branches.
Source: OSV GHSA-h9g5-28mm-hx3gAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| echo labstack |
< 4.16.0 (affected) >= 5.0.0, < 5.4.0 (affected) |
CNA: GitHub_M |
github.com/labstack/echo/v5github.com/labstack/echo/v5
Go |
≥ 0; < 5.4.0 (affected, semver); OSV events: introduced 0; fixed 5.4.0Source events (semver)
Other versions: unaffected |
OSV GHSA-h9g5-28mm-hx3g |
github.com/labstack/echo/v4github.com/labstack/echo/v4
Go |
≥ 0; < 4.16.0 (affected, semver); OSV events: introduced 0; fixed 4.16.0Source events (semver)
Other versions: unaffected |
OSV GHSA-h9g5-28mm-hx3g |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 6.1 medium |
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | CNA: GitHub_M |
Exploit evidence
- https://github.com/labstack/echo/security/advisories/GHSA-h9g5-28mm-hx3g
exploit · ADP: CISA-ADP
References
- https://github.com/labstack/echo/security/advisories/GHSA-h9g5-28mm-hx3gCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5afCNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/releases/tag/v4.16.0CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/releases/tag/v5.4.0CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/security/advisories/GHSA-h9g5-28mm-hx3gADP: CISA-ADP · exploit
- https://github.com/advisories/GHSA-h9g5-28mm-hx3gOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-h9g5-28mm-hx3gOSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.