Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/labstack/echo/v4
  4. ›
  5. CVE-2026-118652

CVE-2026-118652: Echo vulnerable to Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlob

October 28, 2026

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 →

Affected versions

All versions before 4.16.0

Fixed versions

  • 4.16.0

Solution

Upgrade to version 4.16.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

go/github.com/labstack/echo/v4/CVE-2026-118652.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 29 Oct 2026 12:16:17 +0000.