WindowGlobalParent::RecvUpdateDocumentSecurityInfo stores child-supplied TLS info without validation - compromised renderer spoofs padlock and certificate UI
Categories
(Core :: DOM: Security, defect)
Tracking
()
People
(Reporter: pakhunov.anton.n, Unassigned)
Details
(Keywords: ai-involved, reporter-external)
Attachments
(1 file)
|
3.46 KB,
application/javascript
|
Details |
Summary
WindowGlobalParent::RecvUpdateDocumentSecurityInfo stores a child-supplied nsITransportSecurityInfo object directly in mSecurityInfo without any validation. This is the value the browser reads to render the padlock icon and certificate details. A compromised renderer can send a forged TransportSecurityInfo and make an insecure HTTP page appear to have a valid HTTPS certificate.
The handler
// dom/ipc/WindowGlobalParent.cpp
mozilla::ipc::IPCResult WindowGlobalParent::RecvUpdateDocumentSecurityInfo(
nsITransportSecurityInfo* aSecurityInfo) {
mSecurityInfo = aSecurityInfo; // stored verbatim, no validation
return IPC_OK();
}
IPDL definition (PWindowGlobal.ipdl):
[LazySend] async UpdateDocumentSecurityInfo(
nullable nsITransportSecurityInfo aSecurityInfo);
There is no check that aSecurityInfo corresponds to the actual TLS channel for this window, no comparison against socket-side security state, and no origin or ownership verification.
For comparison, RecvUpdateDocumentPrincipal does validate:
if (!mDocumentPrincipal->Equals(aNewDocumentPrincipal)) {
return IPC_FAIL(this, "Trying to reuse WindowGlobalParent...");
}
RecvUpdateDocumentSecurityInfo has no equivalent check.
What mSecurityInfo drives
WindowGlobalParent::GetSecurityInfo() returns mSecurityInfo directly. This is consulted by:
- The identity panel ("padlock" and site information UI)
nsSecureBrowserUIto determine which icon to display- Extensions via
nsISecureBrowserUI::state about:certificatepage for certificate details
Attack path
A compromised content process at http://evil.com:
- Constructs a
TransportSecurityInfowith a forged certificate chain forhttps://bank.com(the cert is real - attacker fetched it by visiting bank.com over HTTPS) - Sends
UpdateDocumentSecurityInfoIPC with the forged object - Parent stores it in
mSecurityInfowithout checking it against the actual socket - Browser UI reads
GetSecurityInfo()and displays the padlock icon with bank.com's certificate - The user sees a green padlock and bank.com's EV cert details on what is actually an HTTP page from evil.com
The content of the page (attacker-controlled) combined with the trusted certificate UI creates a phishing surface that bypasses the browser's own security indicators.
Fix
Before storing aSecurityInfo, validate that it corresponds to the actual channel security state for this window. The parent can derive the expected security info from the channel itself rather than accepting it from the child. Alternatively, reject the message if the supplied security info does not match the channel's socket security info obtained from the parent side.
| Reporter | ||
Comment 1•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Description
•