Apr 9, 2026·6 min read·32 visits
A delimiter injection vulnerability in Mercure Hub's cache mechanism allows authenticated attackers to access private topic data or cause denial of service via cache key collisions.
The Mercure Hub's TopicSelectorStore is vulnerable to a cache key collision due to improper delimiter handling. This vulnerability enables an attacker to bypass authorization checks, leading to unauthorized access to private topic data or targeted denial-of-service conditions.
The Mercure Hub implements a real-time messaging protocol utilizing server-sent events. The hub manages a TopicSelectorStore component responsible for matching subscriber topic selectors against published resource URIs. This component employs an internal cache to optimize matching operations and reduce computational overhead during high-volume message broadcasting.
A vulnerability in this caching implementation, classified as CWE-1289 (Improper Validation of Unsafe Equivalence in Input), allows for delimiter injection. The system relies on string concatenation to build cache keys, failing to establish strict boundaries between concatenated variables. This structural flaw produces cache key collisions when inputs contain the designated delimiter character.
An attacker exploiting this vulnerability can force the system to cache a specific match evaluation state under an overlapping key. This manipulation grants unauthorized parties access to private topic updates if they successfully collide their public topic request with a private topic identifier. Conversely, attackers can induce a targeted denial-of-service state by caching a negative match evaluation for legitimate subscribers.
The vulnerability possesses a CVSS 4.0 base score of 7.1, reflecting its high severity. The rating emphasizes the high confidentiality impact and low availability impact executable over a network vector without user interaction. Exploitation mandates only low privileges, specifically the baseline capability to interact with the hub's subscription endpoints.
The underlying flaw resides within the caching logic of topicselector.go. The system builds a string key to store boolean results of topic matching operations. The key construction utilizes a string builder appending the static prefix m_, the selector string, an underscore delimiter, and the topic string.
The specific vulnerability arises from the lack of boundary preservation during this serialization. The underscore character serves as a static delimiter but is also permitted within the dynamic selector and topic fields. The encoding function mathematically fails the property of injectivity, mapping multiple distinct input pairs to identical output strings.
When a specific combination is queried, the cache returns the stored result of the previous overlapping permutation. The engine evaluates selector="a" and topic="b_c" but returns the cached boolean match result originally calculated for selector="a_b" and topic="c". The cache completely ignores the actual structural difference of the two distinct evaluations.
The vulnerable Go implementation prior to version 0.22.0 relied on a strings.Builder to construct the cache key dynamically. The match function combined the variables sequentially with hardcoded bytes.
// VULNERABLE CODE (Pre-v0.22.0)
var b strings.Builder
b.Grow(3 + len(topicSelector) + len(topic))
b.WriteString("m_")
b.WriteString(topicSelector)
b.WriteByte('_') // Static delimiter injection point
b.WriteString(topic)
k = b.String()The patched code in commit 4964a69be904fd61e35b5f1e691271663b6fdd64 completely eliminates the string serialization approach. The developer introduced a strongly typed Go composite struct named matchCacheKey.
// MITIGATED CODE (v0.22.0)
type matchCacheKey struct {
topicSelector string
topic string
}
// ... inside match function ...
k := matchCacheKey{topicSelector: topicSelector, topic: topic}
if value, found := tss.matchCache.GetIfPresent(k); found {
return value
}This structural change permanently resolves the vulnerability class. The Go runtime evaluates composite map and cache keys by comparing individual fields sequentially, maintaining strict boundaries in memory. This native language feature prevents string values from bleeding into adjacent fields, fully neutralizing the CWE-1289 vulnerability.
The attack methodology requires the threat actor to establish an authenticated session with the Mercure Hub. The attacker must possess the privileges to subscribe or publish to specific target topics within the instance. Anonymous, unauthenticated exploitation is structurally impossible unless the hub is explicitly configured for open access.
The attacker evaluates the target environment to identify a private topic structure. The objective is to determine a corresponding public or accessible topic combination that produces an identical concatenated string. The attacker must mathematically align the underscore placements across the topicSelector and topic inputs.
The cache poisoning sequence is initiated by requesting the crafted public permutation. This action forces the Mercure Hub to evaluate the match and store the resulting state under the compromised key identifier. The attacker deliberately triggers this evaluation to embed a known state into the cache memory space.
Subsequent requests executing against the private topic permutation trigger the collision. If an authorized client requests the private stream, they receive the cached negative match, resulting in a targeted denial of service. Conversely, if the attacker engineered a positive match cache entry, they bypass standard authorization barriers to read restricted data streams.
The primary consequence of successful exploitation is a breakdown of authorization boundaries for real-time messaging streams. Attackers achieve read access to restricted data streams intended exclusively for privileged internal components or specific users. This represents a high confidentiality impact under the CVSS scoring system.
The vulnerability facilitates a secondary denial-of-service capability against the messaging subsystem. By deliberately seeding negative match results under collided keys, attackers can actively block authorized subscribers from receiving critical system updates. This availability impact is evaluated as low due to its targeted nature and localized effect.
Exploitation is contingent upon specific structural requirements within the deployment. The attacker must possess prior knowledge of target private topic structures to synthesize the overlapping input permutations. Additionally, the attacker must hold a valid connection token to interact with the hub's subscription mechanisms.
The CVSS 4.0 vector formulation calculates a base score of 7.1. The variables contributing to this score are the network attack vector (AV:N), the absence of complex attack prerequisites (AC:L), and the lack of required user interaction (UI:N). The confidentiality impact (VC:H) drives the ultimate severity classification.
The primary mitigation path requires administrators to upgrade the Mercure deployment to version 0.22.0 or subsequent releases. This version structurally addresses the delimiter injection vulnerability by modifying internal cache key data types. The adoption of Go composite structs prevents the underlying input parsing failure.
Workaround feasibility is extremely low for deployments unable to patch immediately. Implementing a Web Application Firewall (WAF) or reverse proxy rule to globally block underscores in topic names is generally impractical. Underscores function as standard characters in many RESTful resource identifiers and dropping them disrupts legitimate traffic flows.
The applied patch provides a complete and permanent fix for this specific code pathway. The structural change to native interface caching neutralizes the entire CWE-1289 vulnerability class within the TopicSelectorStore. Variant string injection attacks against this subsystem are mathematically impossible under the new architecture.
Organizations should complement the technical patch with defense-in-depth reviews. Security teams must review internal topic nomenclature to ensure strict access token boundaries. External clients must only receive tokens scoped strictly to their required access domains, minimizing the attack surface for potential authenticated manipulation.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Mercure Hub github.com/dunglas | < 0.22.0 | v0.22.0 |
| Attribute | Detail |
|---|---|
| Vulnerability Type | Improper Validation of Unsafe Equivalence in Input (CWE-1289) |
| Attack Vector | Network (Authenticated) |
| CVSS 4.0 Score | 7.1 (High) |
| Confidentiality Impact | High |
| Exploit Maturity | Proof of Concept (PoC) |
| Fixed Version | v0.22.0 |
The software uses a mechanism to determine if two inputs are equivalent, but the mechanism can be manipulated to improperly identify non-equivalent inputs as equivalent.
An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.
CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.
CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.
CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.
CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.
CVE-2026-124194 is a forced authentication and spoofing vulnerability in Microsoft Office Outlook caused by a missing user interface warning before dereferencing remote network paths (CWE-356). By embedding an attacker-controlled Universal Naming Convention (UNC) path within MAPI message properties such as PidLidReminderFileParameter, an unauthenticated remote attacker can force a victim's system to initiate an outbound SMB or WebDAV connection upon opening or previewing a crafted message. This automatic authentication handshake leaks the user's NetNTLMv2 hash, enabling offline password cracking or real-time NTLM relay attacks. The vulnerability was exploited in the wild as a zero-day prior to its remediation in Microsoft's November 2026 Patch Tuesday updates and is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.