CVE-2026-58172
Received Received - Intake

Ocelot WebSocket Security Bypass via Missing Middleware

Vulnerability report for CVE-2026-58172, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-30

Last updated on: 2026-06-30

Assigner: VulnCheck

Description

Ocelot through 24.1.0, fixed in commit f156fd4, contains a security control bypass vulnerability that allows denied clients to circumvent IP-based access restrictions by sending WebSocket upgrade requests. The WebSocket upgrade pipeline branch configured via MapWhen in OcelotPipelineExtensions.cs omits SecurityMiddleware, causing requests from blocked IP addresses to be proxied to downstream services without enforcement of the configured allow/block list.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-06-30
Last Modified
2026-06-30
Generated
2026-06-30
AI Q&A
2026-06-30
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
three_mammals ocelot to 24.1.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-288 The product requires authentication, but the product has an alternate path or channel that does not require authentication.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability exists in Ocelot versions up to 24.1.0 and allows clients that are supposed to be blocked by IP-based access restrictions to bypass these controls by sending WebSocket upgrade requests.

The root cause is that the WebSocket upgrade pipeline in Ocelot is handled separately from the main HTTP request pipeline and does not include the SecurityMiddleware that enforces IP allow/block lists.

As a result, blocked IP addresses can still establish WebSocket connections to downstream services, circumventing the intended security restrictions.

Impact Analysis

An attacker from a blocked or unauthorized IP address can exploit this vulnerability to bypass IP filtering and access protected downstream WebSocket services.

This unauthorized access could lead to compromise of confidentiality and integrity depending on what the downstream WebSocket services expose or allow.

Because the IP restrictions are not enforced on WebSocket upgrade requests, sensitive services might be exposed to unauthorized clients, increasing the risk of data leakage or unauthorized actions.

Detection Guidance

This vulnerability can be detected by monitoring WebSocket upgrade requests from IP addresses that are supposed to be blocked or denied by your IP allow/block list configuration in Ocelot.

Specifically, you should look for WebSocket upgrade requests (HTTP headers containing 'Upgrade: websocket') originating from IPs that are on your blocked list but still successfully establishing connections.

Commands to detect this might include network traffic inspection tools or logs analysis to identify such bypass attempts. For example:

  • Using tcpdump or tshark to filter WebSocket upgrade requests from blocked IPs: tcpdump -i <interface> 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420 and src host <blocked_ip>'
  • Using grep on Ocelot access logs to find WebSocket upgrade requests from blocked IPs: grep 'Upgrade: websocket' <ocelot_access_log> | grep '<blocked_ip>'

Additionally, check if blocked IPs are receiving HTTP 403 Forbidden responses for WebSocket upgrade requests. If they are not, it indicates the vulnerability is present.

Mitigation Strategies

To mitigate this vulnerability immediately, you should update Ocelot to a version that includes the fix from commit f156fd4 or later, where SecurityMiddleware is applied to the WebSocket upgrade pipeline.

This fix ensures that IP allow/block lists are enforced consistently for both HTTP and WebSocket requests, preventing unauthorized IPs from bypassing restrictions via WebSocket upgrades.

  • Apply the patch or upgrade to Ocelot version 25.0 or later where the WebSocket pipeline includes SecurityMiddleware.
  • Verify that blocked IPs receive HTTP 403 Forbidden responses when attempting WebSocket upgrades.
  • Review and update your security policies and configurations to ensure they are applied to WebSocket connections as well as HTTP.

If immediate upgrade is not possible, consider implementing network-level controls to block WebSocket upgrade requests from unauthorized IPs as a temporary workaround.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58172. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart