Advisory

GHSA-528q-4pgm-wvg2

Also known as: CVE-2025-45286, GO-2025-3554

Summary

Reflected XSS in go-httpbin due to unrestricted client control over Content-Type

Details

Description

The go-httpbin framework is vulnerable to XSS as the user can control the Response Content-Type from GET parameter. This allows attacker to execute cross site scripts in victims browser.

Affected URLs:

  • /response-headers?Content-Type=text/html&xss=%3Cimg/src/onerror=alert(%27xss%27)%3E
  • /base64/PGltZy9zcmMvb25lcnJvcj1hbGVydCgneHNzJyk+?content-type=text/html
  • /base64/decode/PGltZy9zcmMvb25lcnJvcj1hbGVydCgneHNzJyk+?content-type=text/html

Steps to reproduce:

  1. Visit one of the above mentioned URLs.
  2. XSS window will popup

Suggested fix

  • Allow Only Safe Content-Type Values Or give users option to define whitelisted Content-Type headers

Criticality
The following can be major impacts of the issue:

  • Access to victim's sensitive Personal Identifiable Information.
  • Access to CSRF token
  • Cookie injection
  • Phishing
  • And any other thing Javascript can perform

Severity

Low Basis: The source's own band: LOW

Dates

Published
2025-03-21 22:29 UTC
Modified
2026-07-08 07:14 UTC

Affected packages and fixes

github.com/mccutchen/go-httpbin

Go · All systems

Affected

  • introduced 0, fixed 2.18.0 (semver)

Fixed versions

2.18.0

Fix

github.com/mccutchen/go-httpbin/v2

Go · All systems

Affected

  • introduced 0, fixed 2.18.0 (semver)

Fixed versions

2.18.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences