Skip to content

Anthropic

Claude Opus broke four SAML libraries in a month

6 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: oblique.security

Over about a month, a security researcher ran an Opus model against every SAML implementation they could find. The result was full authentication bypasses in four open-source projects, signature bypasses in twelve projects on message types that rarely get security attention, and denial-of-service issues that are still unfixed in Python and Node libraries. The writeup went up on Oblique on August 19, and the harness behind it is public as oblique-security/saml-research.

The author has worked with SAML since adding support for it to Dex almost a decade ago, and that implementation produced several vulnerabilities of its own. To get exploit work out of the model, they applied to Anthropic’s Cyber Verification Program, which removes the guardrails on an account. Once accepted, they had an Opus model that would write exploits based on their research and prompting. It all ran on a Claude Max 20x plan.

How the harness works

The author’s starting point is that asking a model to code and asking it to hack are different jobs, and the difference is scale. Even in a large codebase, tracking down one bug or building one feature needs fairly little context. Hacking means being exhaustive: you keep going until you find a bug or run out of threads to chase.

So the harness is built on the same basics as most hacking harnesses already out there. It splits work across several agents, stores intermediate results that the agents use to decide where to go next, and prioritizes, scopes and deduplicates the remaining work. The pipeline settled on two phases. A gadget phase looks for odd behavior in the underlying libraries. A findings phase combines gadgets and confirms each finding by writing an end-to-end exploit. Both phases write to JSONL files that later steps work on. One of those steps rejects proposed findings that are out of scope before any tokens are spent proving them.

Building the harness was the easy part. The surprise was how little the author had to teach Claude Opus about hacking. When given a corpus of known vulnerabilities, the model often just looked for copies of those exact issues in other libraries. A threat model plus room to explore worked better. The author compares this to agentic coding generally: as models improve, you give fewer specific instructions and more general guidance.

One gadget the model found is in Node’s xml-crypto, in how it handles XML processing instructions. During canonicalization, the step that rewrites XML into one fixed form before the signature is checked, an instruction like <?php echo 1; ?> is flattened to the bare text echo 1;. The findings phase turned that into an email truncation bypass. In the proof, the NameID not-an-admin@example.com inside a validly signed assertion is rewritten as <?p not-an-?>admin@example.com.

Why SAML keeps breaking

In a SAML login, the identity provider signs a response that carries the user’s identity. The service validates that signature and then takes the name from the response. The signature covers one specific element, but the code that reads the name often walks the XML separately. If the two passes land on different elements, unsigned data gets treated as verified. That bug class is called signature wrapping.

Since 2020, a major SAML library has had a bypass about once a quarter. GitHub Enterprise alone had four across 2024 and 2025 (CVE-2024-4985, CVE-2024-6800, CVE-2024-9487, CVE-2025-23369). In the author’s account, nearly all of them come from components reading XML in slightly different ways and then processing unsigned data as if it were verified. Earlier waves had the same root cause. Safeguard reports that Duo Security disclosed bugs of this kind in python-saml, ruby-saml, saml2-js and OmniAuth-SAML in February 2018, and that on September 10, 2024, ruby-saml got CVE-2024-45409, rated CVSS 9.8, because its XPath selector for the DigestValue searched the whole document instead of looking only at the signed element. In December 2025, PortSwigger published “The Fragile Lock,” which describes new classes of signature wrapping that can fully bypass authentication in widely used SAML libraries.

Many libraries now use hardened APIs meant to defend against these attacks. The author set out to prove that SAML itself is a bad protocol but could not structurally break it.

What it found

Four projects had full authentication bypasses:

  • Authentik: injecting a comment into the NameID truncates it to another user’s account, so an attacker can log in as that user (CVE-2026-57580)
  • PHP’s litesaml/lightsaml: signature wrapping on the Response message (CVE-2026-63182)
  • OneUptime: signature wrapping on the Response message
  • Java’s saml-client: signature wrapping on the Response message

Eight independent researchers reported the Authentik bug at the same time. “Clearly, I’m not the only one hacking with AI,” the author wrote.

After the “login as anyone” attacks, the researcher moved on to other parts of the protocol. The SAML Response that carries a user’s email is signed, but technically any message can carry a signature. The ones most often implemented are AuthnRequest, AttributeQuery and LogoutRequest, and they rarely get the security attention the Response does. The author found signature bypasses on these messages in twelve projects, and counting. They lead to information disclosure and arbitrary logouts. The bypass in the TypeScript project samlify has been reported publicly.

Denial of service came last. SAML has to process arbitrary XML documents POSTed over the internet, and almost every major SAML library could be pushed into out-of-memory conditions by unauthenticated requests. A missing check in Go’s xmldsig caused quadratic memory allocation during signature validation. The author got patches accepted for the Go ecosystem. JavaScript’s xmldom causes similar allocations that affect all Node libraries, and that report is still private. Python packages don’t filter the transforms they pass to libxmlsec1, so an XSLT template, here one that calls itself recursively with a depth parameter of 27, can make the library generate an arbitrarily large document. All the Python and Node libraries still have these issues unfixed.

Reports nobody wanted

Many maintainers who got the reports either didn’t respond or were clearly overwhelmed, and AI is now flooding them with both genuine and junk vulnerability reports. One company asked for a screen recording to filter out generated reports. The researcher refused, but because the bug had real impact, the company still responded and fixed it, and a CVE was issued.

OneUptime had the oddest exchange. A private report got no response for a month. The researcher then opened a public issue, and later that same day a very large pull request merged claiming to fix it, with no human acknowledgement. The researcher found a new bypass, and another large fix appeared. Only after the third bypass, which used a processing instruction to change the NameID, did the fixes reach something secure. “It turns out LLMs are also bad at writing secure SAML code,” the author wrote.

The author stopped because “the appetite for these reports wasn’t there,” not because the bugs ran out. Their advice: don’t roll your own SAML implementation, and if you integrate SAML into a product, run an LLM evaluation against your implementation.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.