CVE-2017-20146 · Go
Improper access control in github.com/gorilla/handlers
Usage of the CORS handler may apply improper CORS headers, allowing the requester to explicitly control the value of the Access-Control-Allow-Origin header, which bypasses the expected behavior of the Same Origin Policy.
Published 2022-12-27, last changed 2026-06-17. Weakness: CWE-346.
How to fix
Upgrade to a fixed version: github.com/gorilla/handlers 1.3.0 (Go). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in gorilla/handlers by 90663712d7, pull request #116. Functions changed by the fix: ServeHTTP. Regression tests: cors_test.go. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2021-04-14 | Package advisory GO-2020-0020 |
| 2022-12-27 | Published |
| 2022-12-28 | Package advisory GHSA-jcr6-mmjj-pchw |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 0.76% |
| 2026-12-04 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-jcr6-mmjj-pchw | github.com/gorilla/handlers (Go) | 1.3.0 |
| GO-2020-0020 | github.com/gorilla/handlers (Go) | 1.3.0 |
Also known as: GHSA-jcr6-mmjj-pchw, GO-2020-0020
Credited: Evan J Johnson (other)
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2025-47909 | 2025-08-29 | 7.3 | Improper validation of TrustedOrigins allows CSRF attacks in github.com/gorilla/csrf |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2017-20146, or call /api/v1/vulnerabilities/CVE-2017-20146. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.