LiveActive security incident?Get immediate response
CVE Record

CVE-2021-4236: Panic or authentication bypass in github.com/ecnepsnai/web

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.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

CVE-2021-4236 affects applications using github.com/ecnepsnai/web 1.4.0 WebSockets with an AuthenticateMethod hook. WebSocket paths may skip that authentication hook, which can cause a crash or let a user reach functionality without the expected authentication.

Executive priority

Prioritize assessment if the organization runs Go services using this library for authenticated WebSockets. The worst case is unauthorized access or service disruption, but scope is narrow and tied to specific WebSocket usage.

Technical view

The issue is limited to explicit WebSocket use with AuthenticateMethod. Because AuthenticateMethod is not executed for WebSockets, code expecting non-nil UserData may dereference nil, and authorization decisions depending on that hook may be bypassed.

Likely exposure

Exposure is likely only in Go applications that import github.com/ecnepsnai/web 1.4.0 and use WebSocket handlers with AuthenticateMethod-based authentication. Non-WebSocket request handlers are stated as not vulnerable.

Exploitation context

The CVSS vector indicates remote, unauthenticated, low-complexity exploitation potential. The bundle marks KEV as false and provides no cited evidence of active exploitation, so active exploitation should not be assumed.

Researcher notes

Do not generalize this to all routes in the library. The source states ordinary request handlers without explicit WebSocket use are not vulnerable. Evidence does not identify exploited deployments or affected versions beyond 1.4.0.

Mitigation direction

  • Identify applications using github.com/ecnepsnai/web version 1.4.0.
  • Review all WebSocket handlers using AuthenticateMethod hooks.
  • Apply the referenced upstream commit or a vendor-supported release containing the fix.
  • Do not rely on affected WebSocket AuthenticateMethod behavior for access control.
  • Add defensive nil handling where UserData is consumed.

Validation and detection

  • Inventory Go modules for github.com/ecnepsnai/web 1.4.0.
  • Confirm whether the application explicitly registers WebSocket handlers.
  • Check whether WebSocket authorization depends on AuthenticateMethod.
  • Review code paths that assume UserData is non-nil.
  • Verify the referenced fix is present in the deployed dependency.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-400: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-4236 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2021-4236Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
github.com/ecnepsnai/webgithub.com/ecnepsnai/webgithub.com/ecnepsnai/web, 1.4.0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-400 · source CWE mapping

Uncontrolled Resource Consumption

Uncontrolled Resource Consumption represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.