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:
- Visit one of the above mentioned URLs.
- 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
Security releases
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
- 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.
- 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)
- Is there a fix for CVE-2025-45286? Yes. CVE-2025-45286 is fixed in 2.18.0. Upgrade to this version or later.
- 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
- 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.
- How do I fix CVE-2025-45286?
- Upgrade
github.com/mccutchen/go-httpbinto 2.18.0 or later - Upgrade
github.com/mccutchen/go-httpbin/v2to 2.18.0 or later
- Upgrade