Insufficient validation of untrusted input in WebRTC (CVE-2026-11199)
A logic flaw in WebRTC's STUN/TURN handling lets an on-path attacker forge a success response to an initial unauthenticated TURN ALLOCATE request, bypassing the normal 401 challenge. The attacker can then impersonate the TURN relay for the session, intercepting or manipulating peer-to-peer traffic.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 44 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A logic flaw in WebRTC's STUN/TURN handling allows an on-path attacker to forge a success response to an initial, unauthenticated TURN ALLOCATE request. This bypasses the normal 401 Unauthorized challenge, leaving the port's credential hash empty for all subsequent requests. The attacker can then impersonate the TURN relay indefinitely by using an empty key to compute MESSAGE-INTEGRITY hashes.
Affected files:
third_party/webrtc/p2p/base/stun_request.ccthird_party/webrtc/p2p/base/turn_port.ccthird_party/webrtc/api/transport/stun.ccthird_party/webrtc/rtc_base/message_digest.cc
Estimated timestamp from git blame: 2023-11-15
Summary
A logic flaw exists in StunRequestManager::CheckResponse that allows an active on-path attacker to bypass integrity checks for TURN ALLOCATE success responses. By winning a race against the legitimate TURN server's response to an initial unauthenticated request, an attacker can supply forged relay and mapped addresses. Because the authentication challenge is bypassed, subsequent TURN requests use an empty HMAC key for MESSAGE-INTEGRITY, allowing the attacker to fully impersonate the TURN server for the duration of the session.
Root Cause Analysis
In WebRTC, a TurnPort starts by sending an unauthenticated TURN ALLOCATE request to discover the required realm and nonce. This request is marked with SetAuthenticationRequired(false) because no credentials have been negotiated yet.
In third_party/webrtc/p2p/base/stun_request.cc, the CheckResponse function determines whether to skip integrity validation based on the outgoing request:
bool skip_integrity_checking =
(request->msg()->integrity() == StunMessage::IntegrityStatus::kNotSet);
For the initial unauthenticated request, skip_integrity_checking is set to true and AuthenticationRequired() is false. When an attacker sends a forged Allocate Success (0x0103) response, the code skips the ValidateMessageIntegrity block and evaluates:
} else if (msg->type() == GetStunSuccessResponseType(request->type())) {
if (!msg->IntegrityOk() && !skip_integrity_checking) {
return false;
}
// ...
owned_request->OnResponse(msg);
return true;
}
Because skip_integrity_checking is true, the success response is accepted without a valid MESSAGE-INTEGRITY attribute. The pending request is then erased, meaning the legitimate server's subsequent 401 Unauthorized challenge will be silently dropped.
Because the 401 challenge is dropped, TurnPort::set_realm and TurnPort::UpdateHash are never called, leaving TurnPort::hash_ empty. In Release builds (NDEBUG), the RTC_DCHECK(!hash_.empty()) in TurnPort::AddRequestAuthInfo is compiled out. Subsequent TURN requests (Refresh, CreatePermission) will compute their MESSAGE-INTEGRITY HMAC using this empty key, which ComputeHmac handles by zero-padding.
Potential Exploitation Steps
(Note: These are potential steps based on code analysis; a working PoC has not been executed.)
- Intercept: An active on-path attacker observes the cleartext UDP
TURN ALLOCATErequest and extracts its 12-byte Transaction ID. - Forge: The attacker races the legitimate TURN server by sending a spoofed UDP
STUN Allocate Successresponse (0x0103) containing the intercepted Transaction ID and attacker-controlledXOR-RELAYED-ADDRESSvalues. - Bypass: WebRTC processes the response, bypassing the integrity check because the original request was unauthenticated. The application surfaces the attacker's relay candidate to the remote peer.
- Hijack: Subsequent TURN Refresh requests sent by the browser use an empty key for their
MESSAGE-INTEGRITYattribute. The attacker observes these, validates the empty-key HMAC, and responds with successful responses using the same empty key, maintaining the hijacked session indefinitely.
Impact
An active on-path attacker can force the client to use an attacker-controlled TURN relay. This allows the attacker to intercept, drop, or manipulate the routing of peer-to-peer traffic. While media content remains protected by end-to-end DTLS-SRTP encryption, this breaks the security guarantees of the TURN protocol itself.
Suggested Fix
The system should strictly enforce state transitions for TURN allocations. Specifically:
- If a
TurnAllocateRequestis sent without credentials but theTurnPorthas been configured with a username and password, it should explicitly rejectAllocate Successresponses and only accept a401 Unauthorizedchallenge. - Alternatively,
StunRequestManager::CheckResponseshould be hardened so thatskip_integrity_checkingdoes not automatically bypass validation for Success responses if the protocol dictates that a Success response must always be authenticated once a session is established.
Evaluated with Chrome root at commit: 7353d249d9cacf9c7218e1d7b8a39cf39c72d646
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Raised in root component due to access or custom field issues on 1565889
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the response validation skips integrity checking for the initial unauthenticated request and accepts a success response without a valid MESSAGE-INTEGRITY attribute, so the legitimate 401 challenge is dropped and the credential hash stays empty.
Impact
An active on-path attacker could force the client to use an attacker-controlled TURN relay, allowing interception, dropping, or manipulation of peer-to-peer traffic routing, though media content remains protected by end-to-end DTLS-SRTP encryption.
What the attacker needed
On-path network position; ability to spoof UDP packets; race against legitimate server
The fix
The system should strictly enforce state transitions for TURN allocations, either by rejecting Allocate Success responses when credentials are configured but not yet used, or by hardening CheckResponse so that skip_integrity_checking does not bypass validation for Success responses once a session…
How it was found
- An on-path attacker observes the cleartext UDP TURN ALLOCATE request and extracts its transaction ID.
- The attacker races the legitimate server by sending a spoofed Allocate Success response with the intercepted transaction ID and attacker-controlled relay addresses.
- WebRTC processes the response, bypassing the integrity check because the original request was unauthenticated, and surfaces the attacker's relay candidate.
- Subsequent TURN Refresh requests use an empty key for MESSAGE-INTEGRITY; the attacker validates and responds with matching empty-key responses to keep the hijacked session.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a video call app tries to set up a relay server (TURN) to help connect peers, it first sends an unauthenticated request to learn the server's security challenge. The code wrongly accepts a fake success reply to that first request, so the app never learns the real server's credentials and ends up using an empty key for later messages. An attacker who can watch and inject network traffic can then pretend to be the relay and meddle with the connection.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.