CVE-2025-45286

CVE-2025-45286 is a low-severity cross-site scripting (XSS) vulnerability in github.com/mccutchen/go-httpbin (go), affecting versions < 2.18.0. It is fixed in 2.18.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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

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

Impact

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

github.com/mccutchen/go-httpbin (< 2.18.0) github.com/mccutchen/go-httpbin/v2 (< 2.18.0)

Security releases

github.com/mccutchen/go-httpbin → 2.18.0 (go) github.com/mccutchen/go-httpbin/v2 → 2.18.0 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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

Frequently Asked Questions

  1. What is CVE-2025-45286? CVE-2025-45286 is a low-severity cross-site scripting (XSS) vulnerability in github.com/mccutchen/go-httpbin (go), affecting versions < 2.18.0. It is fixed in 2.18.0. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which packages are affected by CVE-2025-45286?
    • github.com/mccutchen/go-httpbin (go) (versions < 2.18.0)
    • github.com/mccutchen/go-httpbin/v2 (go) (versions < 2.18.0)
  3. Is there a fix for CVE-2025-45286? Yes. CVE-2025-45286 is fixed in 2.18.0. Upgrade to this version or later.
  4. Is CVE-2025-45286 exploitable, and should I be worried? Whether CVE-2025-45286 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-45286 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-45286?
    • Upgrade github.com/mccutchen/go-httpbin to 2.18.0 or later
    • Upgrade github.com/mccutchen/go-httpbin/v2 to 2.18.0 or later

Stop the waste.
Protect your environment with Kodem.