CVSS Score: 7.2 Published: 2026-01-02 Full Report: https://cvereports.com/reports/GHSA-P4F6-H8JJ-VFVF
The mccutchen/go-httpbin framework, a popular tool for inspecting HTTP requests, contained a classic Reflected Cross-Site Scripting (XSS) vulnerability. By allowing attackers to control the Content-Type response header and reflect unescaped payloads in the response body, the /response-headers and /base64 endpoints could be turned against users. This flaw allowed for arbitrary JavaScript execution in the context of a victim's browser, leading to session hijacking, data theft, and other client-side attacks.
A reflected XSS in go-httpbin's /response-headers and /base64 endpoints lets attackers execute JavaScript in a victim's browser. The vulnerability stems from letting the user control both the Content-Type header and the response body content without proper escaping. Upgrade to version v2.18.0 or later to fix it.
- CWE ID: CWE-79
- CWE Name: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- Attack Vector: Network
- CVSS 3.0 Score: 7.2 (High)
- Impact: Arbitrary JavaScript execution in victim's browser, leading to session hijacking and data theft.
- Exploit Status: Proof-of-Concept Available
- KEV Status: Not listed in CISA KEV
- mccutchen/go-httpbin
- go-httpbin: < 2.18.0 (Fixed in:
2.18.0)
- Upgrade to the patched version of mccutchen/go-httpbin.
- Avoid using the
--unsafe-allow-dangerous-responsesflag. - Implement a Content Security Policy (CSP) as a defense-in-depth measure.
- Perform context-aware output encoding on all user-reflected data.
Remediation Steps:
- Identify all instances of
mccutchen/go-httpbinin your environment. - Upgrade all instances to version
v2.18.0or a newer version. - Review the startup configuration for each instance and remove the
-unsafe-allow-dangerous-responsescommand-line flag or theUNSAFE_ALLOW_DANGEROUS_RESPONSES=trueenvironment variable. - Restart the
go-httpbinservice to apply the changes.
Generated by CVEReports - Automated Vulnerability Intelligence