{"id":"GHSA-528q-4pgm-wvg2","summary":"Reflected XSS in go-httpbin due to unrestricted client control over Content-Type","details":"### Description\n\nThe 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.\n\n### Affected URLs:\n- `/response-headers?Content-Type=text/html&xss=%3Cimg/src/onerror=alert(%27xss%27)%3E`\n- `/base64/PGltZy9zcmMvb25lcnJvcj1hbGVydCgneHNzJyk+?content-type=text/html`\n- `/base64/decode/PGltZy9zcmMvb25lcnJvcj1hbGVydCgneHNzJyk+?content-type=text/html`\n\n### Steps to reproduce:\n1. Visit one of the above mentioned URLs.\n2. XSS window will popup\n\n### Suggested fix\n- Allow Only Safe Content-Type Values Or give users option to define whitelisted Content-Type headers\n\n\n### Criticality\nThe following can be major impacts of the issue:\n* Access to victim's sensitive Personal Identifiable Information.\n* Access to CSRF token\n* Cookie injection\n* Phishing\n* And any other thing Javascript can perform","aliases":["CVE-2025-45286","GO-2025-3554"],"modified":"2026-07-08T07:14:02.850946617Z","published":"2025-03-21T22:29:47Z","database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-79"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2025-03-21T22:29:47Z"},"references":[{"type":"WEB","url":"https://github.com/mccutchen/go-httpbin/security/advisories/GHSA-528q-4pgm-wvg2"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-45286"},{"type":"WEB","url":"https://github.com/mccutchen/go-httpbin/commit/0decfd1a2e88d85ca6bfb8a92421653f647cbc04"},{"type":"PACKAGE","url":"https://github.com/mccutchen/go-httpbin"},{"type":"WEB","url":"https://github.com/mccutchen/go-httpbin/releases/tag/v2.18.0"}],"affected":[{"package":{"name":"github.com/mccutchen/go-httpbin","ecosystem":"Go","purl":"pkg:golang/github.com/mccutchen/go-httpbin"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.18.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-528q-4pgm-wvg2/GHSA-528q-4pgm-wvg2.json"}},{"package":{"name":"github.com/mccutchen/go-httpbin/v2","ecosystem":"Go","purl":"pkg:golang/github.com/mccutchen/go-httpbin/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.18.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-528q-4pgm-wvg2/GHSA-528q-4pgm-wvg2.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U"}]}