CVE-2026-6993
Description
A security flaw has been discovered in go-kratos kratos up to 2.9.2. This impacts the function NewServer of the file transport/http/server.go of the component http.DefaultServeMux Fallback Handler. The manipulation results in unintended intermediary. The attack may be launched remotely. The exploit has been released to the public and may be used for attacks. The patch is identified as 0284a5bcf92b5a7ee015300ce3051baf7ae4718d. Applying a patch is advised to resolve this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/go-kratos/kratos/v2Go | <= 2.9.2 | — |
Affected products
1Patches
10284a5bcf92bfix: replace http.DefaultServeMux fallback handlers with safe defaults
1 file changed · +4 −2
transport/http/server.go+4 −2 modified@@ -189,8 +189,10 @@ func NewServer(opts ...ServerOption) *Server { strictSlash: true, router: mux.NewRouter(), } - srv.router.NotFoundHandler = http.DefaultServeMux - srv.router.MethodNotAllowedHandler = http.DefaultServeMux + srv.router.NotFoundHandler = http.NotFoundHandler() + srv.router.MethodNotAllowedHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusMethodNotAllowed) + }) for _, o := range opts { o(srv) }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-jj45-xvq5-rhh9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-6993ghsaADVISORY
- github.com/Yanhu007/kratos/commit/0284a5bcf92b5a7ee015300ce3051baf7ae4718dnvdWEB
- github.com/go-kratos/kratos/issues/3810nvdWEB
- github.com/go-kratos/kratos/pull/3814nvdWEB
- vuldb.com/submit/797099nvdWEB
- vuldb.com/vuln/359545nvdWEB
- vuldb.com/vuln/359545/ctinvdWEB
News mentions
0No linked articles in our index yet.