SecurityContext

CVE-2021-4236: WebSocket - Authentication Bypass

  • Cve: CVE-2021-4236
  • Name: WebSocket - Authentication Bypass
  • Description: Web Sockets do not execute any AuthenticateMethod methods which may be set, leading to a nil pointer dereference if the returned UserData pointer is assumed to be non-nil, or authentication bypass. This issue only affects WebSockets with an AuthenticateMethod hook. Request handlers that do not explicitly use WebSockets are not vulnerable.
  • Impact: Attackers can bypass authentication or cause denial of service by triggering nil pointer dereference.
  • Remediation: Implement proper null checks and ensure AuthenticateMethod is executed correctly.
  • Vulnerability type: null_pointer_dereference
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.01191
  • Epss percentile: 0.68777
  • Assignee: [email protected]
  • Published at: 2022-12-27T22:15:12Z
  • Age in days: 1428
  • Modified at: 2026-06-17T04:19:19Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-4236
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-476NULL Pointer Dereference

Public exploits

UrlSourceAdded date
https://pkg.go.dev/vuln/GO-2021-0107nvd2022-12-27

References

UrlSourceTags
https://github.com/ecnepsnai/web/commit/5a78f8d5c41ce60dcf9f61aaf47a7a8dc3e0002fnvdPatch, Third Party Advisory
https://pkg.go.dev/vuln/GO-2021-0107nvdExploit, Patch, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
web_project:web>= 1.4.0, < 1.5.2nonvd/v1/products/web_project/web

Projects

RepositoryLink kindsIndexedUrl
ecnepsnai/webcommit, fix, package, security_advisoryyes/v1/repositories/ecnepsnai/web

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2022-12-27
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts