VYPR
Medium severity5.3NVD Advisory· Published Apr 25, 2026· Updated Apr 27, 2026

CVE-2026-6993

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.

PackageAffected versionsPatched versions
github.com/go-kratos/kratos/v2Go
<= 2.9.2

Affected products

1

Patches

1
0284a5bcf92b

fix: replace http.DefaultServeMux fallback handlers with safe defaults

https://github.com/Yanhu007/kratosYanhu007Apr 13, 2026via ghsa
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

News mentions

0

No linked articles in our index yet.