Critical, CVSS 9.8GoPublished
Websocket requests did not call AuthenticateMethod
CVE-2021-4236 · GHSA-5gjg-jgh4-gppm
- Affected
- Go github.com/ecnepsnai/web >= 1.4.0, < 1.5.2
- Fixed in
- 1.5.2· Vendor fix available
- Issue
- Impact Depending on implementation, a denial-of-service or privilege escalation vulnerability may occur in software that uses the github.com/ecnepsnai/web package with Web Sockets that have an AuthenticateMethod. The AuthenticateMethod is not called, and UserData will be nil in request methods. Attempts to read the UserData may result in a panic. This issue only affects web sockets where an AuthenticateMethod is supplied to the handle options. Users who do not use web sockets, or users who do not require authentication are not at risk. Example In the example below, one would expect that the AuthenticateMethod function would be called for each request to /example However, the method is not called, and therefor the UserData parameter of the request object in the handle will be nil, when it would have been expected to be the session object we returned. Patches Release v1.5.2 fixes this vulnerability. The authenticate method is now called for websocket requests. All users of the web…
Recommended action: Upgrade to 1.5.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.