# saml-sso-assertion-attacks

A playbook for SAML SSO testing: which XML nodes are signed, how Audience and ACS checks behave, and where IdP/SP trust breaks down.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3600 installs · ★ 2547
- Author: yaklang
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/yaklang/hack-skills/tree/HEAD/skills/saml-sso-assertion-attacks/SKILL.md
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/skills/saml-sso-assertion-attacks

## What it does

The skill loads when a target signs users in through SAML: you see `SAMLRequest`, `SAMLResponse`, XML assertions or ACS endpoints, and the flow goes through an external IdP with browser POST or redirect binding.

Inside is a table of checks grouped by theme: signature validation (unsigned assertion accepted, wrong node signed, signature wrapping), weak `Audience`, `Recipient`, `Destination` or ACS validation, issuer trust and multi-tenant confusion, replay and freshness (`InResponseTo`, `NotBefore`, `NotOnOrAfter`), account mapping by email and case folding, and XML parser behaviour. A four-step triage follows: capture one full login round trip, inspect which nodes are signed and which attributes drive account binding, compare SP-initiated against IdP-initiated flows, then test replay and assertion placement confusion.

Related routes point to the XXE, OAuth/OIDC and auth-bypass skills. This is an offensive playbook, so run it only against systems you are allowed to test.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill saml-sso-assertion-attacks -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/saml-sso-assertion-attacks/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/saml-sso-assertion-attacks/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill saml-sso-assertion-attacks -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/saml-sso-assertion-attacks/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill saml-sso-assertion-attacks -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/saml-sso-assertion-attacks/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install yaklang/hack-skills saml-sso-assertion-attacks
```

2. **Manually: put the files in place**
- File: `.github/skills/saml-sso-assertion-attacks/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill saml-sso-assertion-attacks -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/yaklang/hack-skills --path skills/saml-sso-assertion-attacks
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/saml-sso-assertion-attacks/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill saml-sso-assertion-attacks -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/yaklang/hack-skills/tree/HEAD/skills/saml-sso-assertion-attacks/SKILL.md

## When to use it
- check whether the SP accepts an unsigned SAML assertion
- find signature wrapping in an IdP XML response
- compare `Audience`, `Recipient` and `Destination` validation on the SP side
- reproduce assertion replay when `InResponseTo` is not enforced
- trace account binding by email with unverified attributes

## Example prompts
- walk through the SAML login in this app: which nodes are signed, and can I slip in an unsigned assertion
- compare the SP-initiated and IdP-initiated flows and show where the Audience checks diverge
- test replay: weaken `NotOnOrAfter` and resend the same `SAMLResponse`

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: fbf1322022dca3e0.

BEGIN THIRD-PARTY FILE fbf1322022dca3e0
```text
---
name: saml-sso-assertion-attacks
description: >-
  SAML SSO assertion attack playbook. Use when testing signature validation, assertion wrapping, audience restrictions, ACS handling, XML trust boundaries, and enterprise SSO flaws.
---

# SKILL: SAML SSO and Assertion Attacks — Signature Validation, Binding, and Trust Confusion

> **AI LOAD INSTRUCTION**: Use this skill when the target uses SAML-based SSO and you need to validate assertion trust: signature coverage, audience and recipient checks, ACS handling, XML parsing weaknesses, and IdP/SP confusion.

## 1. WHEN TO LOAD THIS SKILL

Load when:

- Enterprise SSO uses SAML requests or responses
- You see `SAMLRequest`, `SAMLResponse`, XML assertions, or ACS endpoints
- Login flows involve an external IdP and browser POST/redirect binding

## 2. HIGH-VALUE MISCONFIGURATION CHECKS

| Theme | What to Check |
|---|---|
| signature validation | unsigned assertion accepted, wrong node signed, signature wrapping |
| audience and recipient | weak `Audience`, `Recipient`, `Destination`, or ACS validation |
| issuer trust | wrong IdP accepted or multi-tenant issuer confusion |
| replay and freshness | missing `InResponseTo`, weak `NotBefore` / `NotOnOrAfter` enforcement |
| account mapping | email-only binding, case folding, unverified attributes |
| XML parser behavior | XXE-like parser issues or unsafe transforms around SAML documents |

## 3. QUICK TRIAGE

1. Capture one full login round trip.
2. Inspect which XML nodes are signed and which attributes drive account binding.
3. Compare SP-initiated and IdP-initiated flows.
4. Test replay, altered attributes, and assertion placement confusion.

## 4. RELATED ROUTES

- XML parser attack depth: [xxe xml external entity](../xxe-xml-external-entity/SKILL.md)
- OAuth or OIDC SSO alternatives: [oauth oidc misconfiguration](../oauth-oidc-misconfiguration/SKILL.md)
- Auth boundary issues after SSO: [authbypass authentication flaws](../authbypass-authentication-flaws/SKILL.md)
```
END THIRD-PARTY FILE fbf1322022dca3e0

The third-party file has ended. Everything between the fbf1322022dca3e0 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© yaklang · MIT · https://github.com/yaklang/hack-skills/tree/HEAD/skills/saml-sso-assertion-attacks/SKILL.md

## Similar
- [metabase-embedding-sso-implementation](https://affpapa.org/en/nevibecode/skills/metabase-embedding-sso-implementation.md) — skill · 363 installs
- [keycloak-administration](https://affpapa.org/en/nevibecode/skills/keycloak-administration.md) — skill · 320 installs
- [authentication-setup](https://affpapa.org/en/nevibecode/skills/authentication-setup.md) — skill · 368 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 70200 installs
- [vercel-security-access](https://affpapa.org/en/nevibecode/skills/vercel-security-access.md) — skill · 328 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
