Insufficient validation of untrusted input in Cast (CVE-2026-11241)
Chrome's Cast implementation fails to validate namespaces and transport IDs supplied by a Cast receiver, allowing a malicious receiver and coordinating web page to send unauthorised platform commands to the Cast device's platform receiver. This bypasses browser-mediated consent checks.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A malicious Cast receiver can provide a spoofed transportId and reserved namespaces in its RECEIVER_STATUS message, which Chrome fails to validate. A coordinating malicious web page can then use the Presentation API to send unauthorized platform commands (e.g., LAUNCH) directly to the Cast device's platform receiver, bypassing browser-mediated consent.
Affected files:
chrome/browser/media/router/providers/cast/cast_internal_message_util.ccchrome/browser/media/router/providers/cast/app_activity.cccomponents/media_router/common/providers/cast/channel/cast_message_handler.cccomponents/media_router/common/providers/cast/channel/cast_message_util.cc
Estimated timestamp from git blame: 2022-08-25
Description
A potential security vulnerability exists in Chrome's Cast implementation where the browser fails to properly validate namespaces and destination IDs (transportId) provided by a Cast receiver during session establishment. This allows an attacker-controlled web page, working in concert with a malicious Cast receiver, to send unauthorized platform commands directly to the Cast device's platform receiver (receiver-0), bypassing user consent checks typically enforced by the browser.
Technical Details
- Unvalidated Namespace Ingestion: In
chrome/browser/media/router/providers/cast/cast_internal_message_util.cc, the functionCastSession::Frompopulates a session'smessage_namespaces_set from the receiver'sRECEIVER_STATUSmessage (lines 413-421) without filtering for reserved namespaces usingIsCastReservedNamespace(). Additionally, the receiver-suppliedtransportIdis assigned todestination_id_(line 366) without ensuring it does not equalkPlatformReceiverId("receiver-0"). - Authorization Bypass: When a renderer sends a message via
blink::mojom::PresentationConnection, the browser callsAppActivity::SendAppMessageToReceiver(inchrome/browser/media/router/providers/cast/app_activity.cc). This function checks if the requested namespace is in thesession->message_namespaces()set. Because this set was populated using the unvalidated receiver-supplied data, a renderer can specify a reserved namespace (e.g.,urn:x-cast:com.google.cast.receiver) and pass this check. - DCHECK-only Security Guard: The message is subsequently handled by
CastMessageHandler::SendAppMessage(incomponents/media_router/common/providers/cast/channel/cast_message_handler.cc). Line 281 contains aDCHECK(!IsCastReservedNamespace(message.namespace_())). However,DCHECKstatements are stripped in release (production) builds, leaving the browser without outbound protection for reserved namespaces. - Platform Command Injection: Because the
destination_idis set toreceiver-0, the connection is treated as akStrongvirtual connection to the platform receiver. The renderer-supplied JSON body is serialized and sent to the Cast device, allowing an attacker to inject forged platform commands, such asLAUNCHorSTOP.
Potential Reproduction Steps
Note: These are suggested steps based on code analysis; we do not currently have a working proof-of-concept.
- Set up a malicious Cast receiver application that includes a reserved namespace (e.g.,
urn:x-cast:com.google.cast.receiver) in its namespaces and setstransportIdtoreceiver-0in itsRECEIVER_STATUSresponse. - Host a malicious website that uses the Presentation API to cast to this malicious receiver.
- Once the user selects the receiver in the Cast dialog, the website sends an
app_messagetargeting the reserved namespace:JavaScript { type: 'app_message', message: { sessionId: '<assigned_session_id>', namespaceName: 'urn:x-cast:com.google.cast.receiver', message: { type: 'LAUNCH', appId: '<arbitrary_app_id>', requestId: 1 } } } - In a release build of Chrome, the browser will forward this command to the Cast device's platform receiver.
Suggested Fix
- In
CastSession::From(chrome/browser/media/router/providers/cast/cast_internal_message_util.cc), validate thenamespaceslist againstIsCastReservedNamespace(). Ignore or reject any reserved namespaces provided by the receiver. - In
CastSession::From, validate that thetransportIdis not equal tokPlatformReceiverId("receiver-0"). - In
CastMessageHandler::SendAppMessage(components/media_router/common/providers/cast/channel/cast_message_handler.cc), upgrade theDCHECKto aCHECKor return an errorResult::kFailedin release builds if a reserved namespace is encountered.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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.
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 browser trusts the receiver's RECEIVER_STATUS message without validating that the namespaces are not reserved and that the transportId is not the platform receiver ID, and the only guard against sending reserved namespaces is a DCHECK that is removed in release builds.
Impact
An attacker could send unauthorised platform commands (such as LAUNCH or STOP) to the Cast device's platform receiver, bypassing user consent checks; this is limited to release builds of Chrome where DCHECK is disabled.
What the attacker needed
Malicious Cast receiver; malicious website; user selects the malicious receiver
The fix
The fix should validate the namespaces list against IsCastReservedNamespace() and reject reserved namespaces, validate that transportId is not kPlatformReceiverId, and upgrade the DCHECK to a CHECK or return an error in release builds.
How it was found
- Set up a malicious Cast receiver that includes a reserved namespace and sets transportId to receiver-0 in its RECEIVER_STATUS response.
- Host a malicious website that uses the Presentation API to cast to this malicious receiver.
- Once the user selects the receiver in the Cast dialog, the website sends an app_message targeting the reserved namespace.
- In a release build of Chrome, the browser forwards this command to the Cast device's platform receiver.
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.
Chrome lets websites talk to Cast devices (like TVs) through a system called Cast. A malicious website could work with a fake Cast receiver to send commands directly to the device, skipping the normal permission checks. This means the website could launch or stop apps on the Cast device without the user's consent.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.