Vulnerabilities in pkg:golang/github.com/mccutchen/go-httpbin/v2
PACKAGECVE-2025-45286 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/mccutchen/go httpbin libraries in the Go ecosystem. The issue involves reflected xss in go-httpbin due to unrestricted client control over content-type. Remediation is available by upgrading affected packages to version 2.18.0.
pkg:golang/github.com/mccutchen/go-httpbin/v2
Vulnerability advisories affecting package pkg:golang/github.com/mccutchen/go-httpbin/v2. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-528q-4pgm-wvg2 | CVE-2025-45286 | LOW | Reflected XSS in go-httpbin due to unrestricted client control over Content-Type |
| GHSA-p4f6-h8jj-vfvf | - | LOW | Duplicate Advisory: Reflected XSS in go-httpbin due to unrestricted client control over Content-Type |
CVE-2025-45286 at a Glance
How to Fix CVE-2025-45286
To remediate this vulnerability, upgrade all affected Github.com/mccutchen/go httpbin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/mccutchen/go-httpbin to 2.18.0
Upgrade github.com/mccutchen/go-httpbin/v2 to 2.18.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/mccutchen/go-httpbin
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-45286, inspect your project dependencies for Github.com/mccutchen/go httpbin:
inspect dependencies for github.com/mccutchen/go-httpbin
Analyze the terminal output to locate any version of Github.com/mccutchen/go httpbin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.18.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/mccutchen/go httpbin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-45286 Affected Github.com/mccutchen/go httpbin Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/mccutchen/go-httpbin
|
Go |
< 2.18.0
|
2.18.0
|
|
github.com/mccutchen/go-httpbin/v2
|
Go |
< 2.18.0
|
2.18.0
|
References
Frequently Asked Questions
What is CVE-2025-45286?
Which Github.com/mccutchen/go httpbin versions are affected?
What version fixes CVE-2025-45286?
Is github.com/mccutchen/go-httpbin affected?
Is github.com/mccutchen/go-httpbin/v2 affected?
What CWE is associated with CVE-2025-45286?
How can I check Go dependencies for CVE-2025-45286?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-528q-4pgm-wvg2",
"modified" : "2026-01-02T20:32:35Z",
"published" : "2025-03-21T22:29:47Z",
"aliases" : [ "CVE-2025-45286" ],
"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" : "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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-21T22:29:47Z",
"nvd_published_at" : null
}
}