[Paper Review] An Expressive Model for the Web Infrastructure: Definition and Application to the BrowserID SSO System
This paper presents a comprehensive formal model of the web infrastructure, emphasizing precision in capturing standards and specifications. It applies the model to rigorously analyze Mozilla's BrowserID single sign-on system, uncovering critical security flaws that were previously undetected, leading to fixes adopted by Mozilla and recognition through their bug bounty program.
The web constitutes a complex infrastructure and as demonstrated by numerous attacks, rigorous analysis of standards and web applications is indispensable. Inspired by successful prior work, in particular the work by Akhawe et al. as well as Bansal et al., in this work we propose a formal model for the web infrastructure. While unlike prior works, which aim at automatic analysis, our model so far is not directly amenable to automation, it is much more comprehensive and accurate with respect to the standards and specifications. As such, it can serve as a solid basis for the analysis of a broad range of standards and applications. As a case study and another important contribution of our work, we use our model to carry out the first rigorous analysis of the BrowserID system (a.k.a. Mozilla Persona), a recently developed complex real-world single sign-on system that employs technologies such as AJAX, cross-document messaging, and HTML5 web storage. Our analysis revealed a number of very critical flaws that could not have been captured in prior models. We propose fixes for the flaws, formally state relevant security properties, and prove that the fixed system in a setting with a so-called secondary identity provider satisfies these security properties in our model. The fixes for the most critical flaws have already been adopted by Mozilla and our findings have been rewarded by the Mozilla Security Bug Bounty Program.
Motivation & Objective
- To develop a precise, standards-based formal model of the web infrastructure that captures complex interactions across DNS, HTTP, browsers, and web applications.
- To provide a foundation for rigorous security analysis of real-world web systems beyond what prior automated models could achieve.
- To apply the model to analyze BrowserID (Mozilla Persona), a complex SSO system using AJAX, postMessage, and HTML5 storage.
- To identify and formally verify fixes for critical vulnerabilities in BrowserID that were undetected in prior models.
- To demonstrate the value of a comprehensive, specification-accurate model in uncovering subtle but severe security flaws.
Proposed method
- The model is based on a Dolev-Yao-style formalism, modeling web entities as atomic processes with addresses and messages as formal terms with equational theories for cryptographic operations.
- It defines detailed components: web systems, DNS servers, HTTP messages, web browsers (with state $Z^p$ and relation $R^p$), and web servers, each with formalized behavior and protocols.
- The model captures browser-specific behaviors such as origin policies, cookie handling, web storage, and cross-origin messaging using formal functions and state transitions.
- The system is modeled with explicit roles: browsers, relying parties (RPs), identity providers (IdP), and the LPO (Login Provider Origin), each with defined atomic processes and message flows.
- Security properties are formally stated and proven using logical reasoning, including conditions on attacker knowledge and request origin, with proofs based on lemmas about key and identity knowledge.
- The analysis uses step-by-step execution traces and formal invariants to verify that fixed system behavior satisfies desired security properties under defined threat models.
Experimental results
Research questions
- RQ1Can a formal model of the web infrastructure be constructed that is both expressive and faithful to actual web standards and specifications?
- RQ2To what extent can such a model detect security flaws in complex, real-world web applications like BrowserID that prior models missed?
- RQ3What specific vulnerabilities exist in the BrowserID SSO system that arise from its interaction with modern web technologies like postMessage and web storage?
- RQ4Can formal proofs be constructed to show that fixes to BrowserID's flaws restore desired security properties under realistic threat models?
- RQ5How does the inclusion of a secondary identity provider (sIdP) affect the security guarantees of the BrowserID system?
Key findings
- The model revealed four critical vulnerabilities in BrowserID: identity forgery, login injection, key cleanup failure, and cookie cleanup failure (in the secondary IdP case).
- The identity forgery attack allowed an attacker to impersonate a user by forging a CAP (Credential Assertion Package) without knowing the user's private key.
- The login injection attack exploited improper validation of origin and identity assertions, allowing an attacker to redirect login sessions to a malicious site.
- The key cleanup failure attack allowed an attacker to retain access to a user's identity after logout by not properly invalidating cryptographic keys.
- The cookie cleanup failure (in sIdP mode) allowed persistent session tracking across logouts due to improper cookie handling.
- All critical flaws were formally fixed, and the corrected system was proven to satisfy core security properties in the model, with fixes adopted by Mozilla and rewarded via their Security Bug Bounty Program.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.