{ "schema_version": "1.4.0", "id": "GHSA-528q-4pgm-wvg2", "modified": "2025-03-21T22:29:47Z", "published": "2025-03-21T22:29:47Z", "aliases": [], "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", "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" } ], "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/mccutchen/go-httpbin" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.18.0" } ] } ] }, { "package": { "ecosystem": "Go", "name": "github.com/mccutchen/go-httpbin/v2" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.18.0" } ] } ] } ], "references": [ { "type": "WEB", "url": "https://github.com/mccutchen/go-httpbin/security/advisories/GHSA-528q-4pgm-wvg2" }, { "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" } ], "database_specific": { "cwe_ids": [ "CWE-79" ], "severity": "LOW", "github_reviewed": true, "github_reviewed_at": "2025-03-21T22:29:47Z", "nvd_published_at": null } }