PORTA: Systematic Discovery of Vulnerabilities in Identity Brokers
summary
The gist
Identity brokers such as Keycloak, Vault, and Dex translate authentication proofs from an upstream identity provider into sessions for downstream services.
In short
PORTA uses a large language model to systematically test identity brokers like Keycloak by defining five security invariants that brokers must follow. This automated tool generates attack sequences and checks them against these rules, discovering 33 previously unreported vulnerabilities across seven popular open-source brokers.
Key concepts
- Security Invariants (I1-I5)
- These are formal rules that identity brokers must uphold throughout their operation. They define properties like proof integrity, temporal validity, and authorization scope. These rules serve as the blueprint for finding security flaws by checking if a broker's behavior violates any of these necessary conditions.
- PORTA Pipeline
- This is a four-phase automated testing system. It uses an LLM to adapt the broker's API into a common profile, then generates potential attack sequences based on the invariants, executes them against live brokers in isolated environments, and finally checks the results against expected security rules.
- Specification Violations (S) vs. Under-specified Vulnerabilities (U)
- Findings are categorized based on whether they violate a strict protocol requirement or if the requirement was optional or debatable. Specification violations occur when a broker breaks a 'must-have' rule in standards like OIDC. Under-specified flaws happen when the violation stems from incorrect assumptions about how roles should behave.
- Assumption Mismatch Patterns
- These are recurring mistakes found in broker code where developers incorrectly assume certain behaviors of single roles. The most common mismatches involve silently skipping required fields or explicitly disabling verification checks, which account for over half of all discovered flaws.
Terminology used across episodes
This episode discusses
The paper
PORTA: Systematic Discovery of Vulnerabilities in Identity Brokers · Read on arXiv
Zixu Zhou, Xiangyu Guo, Ilya Grishchenko, David Lie
University of Toronto
Identity brokers such as Keycloak, Vault, and Dex translate authentication proofs from an upstream identity provider into sessions for downstream services. Due to their central role in authentication and trust mediation, a single vulnerability in a broker compromises every downstream service behind it. In fact, recent incidents have demonstrated that even widely adopted platforms are not immune to such issues, highlighting the critical need for systematic analysis. To build such an analysis, this work first defines invariants for broker operation. These invariants are not completely covered by existing authentication specifications, primarily because brokers are unique in their duality, i.e., acting simultaneously as a relying party and an identity provider. The invariants capture the properties that identity brokers must uphold throughout their workflows, as all 60 previous CVEs we consider violate at least one invariant. Within these workflows, we further define high-level action categories. Equipped with this information, our automated tool PORTA leverages a large language model (LLM) to generate API invocation sequences corresponding to the high-level action categories, and oracle assertions aligned with the specified invariants. PORTA identifies 33 previously unreported security vulnerabilities in seven popular open-source brokers. We study these novel vulnerabilities and trace them to eight recurring patterns. We responsibly disclosed all discovered vulnerabilities: 29 have been confirmed, 14 patched, and 19 assigned CVE numbers, with 10 CVEs rated as critical.
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "PORTA: Systematic Discovery of Vulnerabilities in Identity Brokers".
Title and authors: Nadia: So, what exactly is PORTA doing here? It seems like they’re trying to move beyond just finding random bugs and instead systematically proving what a broker *must* do correctly.
Elias: That's right. They start by defining these security invariants for broker operation. These aren't just guesses; they come from analyzing forty requirements across eight different authentication specifications plus sixty previous known security issues in ten different broker platforms <ref:2611.33015#pg2>.
Priya: But what do those invariants actually look like in practice? Are they just abstract rules, or do they capture real-world failure modes?
Nadia: They are quite concrete, actually. They define five specific properties that the broker has to uphold throughout its whole workflow. These invariants serve to make the broker's correctness requirements explicit and organize how the AI tool PORTA works <ref:2611.33015#pg2>.
Elias: Let me lay them out for you, because they are a bit dense, but they map directly to what goes wrong. First, Proof Integrity: verifying something leads to extracting something that must have the same security context <ref:2611.33015#pg3>. Then there’s Temporal Validity—that deals with how long things are valid and whether you can use them only once <ref:2611.33015#pg2>.
Priya: That temporal part sounds interesting because it touches on timing, which is often where these kinds of subtle bugs hide. Does that mean we need to worry about replay attacks or something similar?
Nadia: It means they are explicitly checking the time window for tokens and making sure you can only use a specific credential one time <ref:2611.33015#pg2>. Next is Flow Coherence, which just makes sure the whole process from issuing a request to extracting the data stays consistent <ref:2611.33015#pg3>.
Elias: And then we have Principal Binding, which ensures that if you map two different upstream items to downstream requests, their resulting principals—their identities—have to be different <ref:2611.33015#pg2>. Finally, Authorization Scope checks that the permissions the broker issues are strictly contained within what the upstream identity intended and what its policy allows <ref:2611.33015#pg2>.
Priya: So they’ve turned abstract protocol rules into a concrete checklist for security. That makes sense when you're trying to test something that spans so many different systems. Where do we go from here with this idea?
The paper's summary: Nadia: Now the big part is how they actually use these invariants. They built a tool called PORTA which uses a large language model, or LLM, to generate the actual attack sequences and the required verification checks for those invariants <ref:2611.33015#pg4>.
Elias: It’s a pipeline. Phase one is platform adaptation where the LLM creates a profile of that specific broker by mapping its API to thirty-three abstract operations <ref:2611.33015#pg4>.
Priya: Mapping to thirty-three operations sounds like a lot of work for an AI to do accurately. How does it handle the messy details of different brokers?
Nadia: The LLM handles the heavy lifting there, abstracting away the platform differences into a common profile that connects each abstract operation to the actual HTTP method, URL path, request parameters and response fields <ref:2611.33015#pg4>.
Elias: Then in phase two, using those invariants they generate candidate attack sequences and their corresponding oracle assertions—those are the expected answers based on the rules we just defined <ref:2611.33015#pg4>.
Priya: Oracle assertions sound like the ground truth for what a correct response should look like. So, the AI isn't just guessing; it’s generating mathematically compliant tests based on those five invariants <ref:2611.33015#pg4>.
Nadia: Exactly. And phase three is execution—running those sequences against a live broker instance inside an isolated container so you can actually see if they fail or pass <ref:2611.33015#pg4>.
Elias: And finally, phase four is verdict generation, where the system mechanically checks the actual HTTP responses against those oracle assertions to determine if the invariant was violated <ref:2611.33015#pg4>.
Priya: So, this is a way to test platform-independent security properties by using an LLM to generate both the attack paths and the expected correct answers derived from these rules. That’s a pretty clever way to approach testing something that moves around so much.
The paper's improvements: Nadia: So, what did they find when they ran this system? They found nine hundred twenty-six candidate vulnerabilities before they filtered them down, and after deduplication, they got two hundred fifty-two candidate vulnerabilities per run <ref:2611.33015#pg5>.
Elias: Manual analysis confirmed two hundred twenty-six of those findings across three independent runs, and they identified thirty-three distinct security flaws in total <ref:2611.33015#pg5>.
Priya: And it’s interesting how they categorized these findings into specification violations and under-specified vulnerabilities. Specification violations were fifteen of those thirty-three root causes, while under-specified flaws made up the other eighteen <ref:2611.33015#pg5>.
Nadia: That split tells us something about where the problems really lie in identity brokers. The findings are grouped by which invariant they violate, which shows patterns across different platforms <ref:2611.33015#pg5>.
Elias: Specifically, they found that invariants two and five tend to produce mostly specification violations because those rules have very explicit "must" clauses written directly into standards like OIDC and JWT specifications <ref:2611.33015#pg5>.
Priya: That makes sense because if a standard says you *must* do something, and the broker doesn't, it's a clear violation of the specification. But what about the other invariants?
Nadia: For invariant three—Flow Coherence—six of those findings are under-specified flaws, and all four findings for invariant four are also under-specified <ref:2611.33015#pg5>.
Elias: That suggests that the problems with flow coherence and principal binding aren't necessarily failures to meet a hard requirement, but rather a failure to fully implement an optional or debatable aspect of the protocol specification <ref:2611.33015#pg5>.
Priya: And this leads us into something else they found: assumption-mismatch patterns. They saw that most vulnerabilities came from incorrect assumptions about how a single role in a protocol should behave <ref:2611.33015#pg5>.
Nadia: The biggest groups of those mismatches were silent skips on fields that were absent and explicit disabling of verification checks, which together account for just over half of all the findings <ref:2611.33015#pg5>.
Conclusion: Elias: So, to wrap up this whole PORTA work, the main contribution is formalizing those five translation invariants—I one through I five—derived from forty requirements and sixty previous CVEs <ref:2611.33015#pg2>.
Nadia: These invariants give us a clear framework to see what a broker must do correctly, which helps organize the testing tool itself and provides a lens for interpreting every finding we get <ref:2611.33015#pg2>.
Priya: What does this mean for the bigger picture? It seems like they’ve taken something that used to be ad-hoc security testing and turned it into a structured, repeatable process based on deep protocol analysis.
Elias: They are planning future work where they want to engage with standards bodies to try and lift invariants three and four directly into the official specifications <ref:2611.33015#pg6>.
Nadia: And they’re also looking at extending this from testing just one broker to testing entire chains of brokers, which is a big step in understanding the whole trust path <ref:2611.33015#pg6>.
Priya: It really shows that when you analyze the mechanics deeply—when you define exactly what correctness means—you can generate automated tests that find flaws across many systems at once. That’s a powerful way to approach security research.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04