{
  "id": "security/saml-xml-signature-wrapping-bypass",
  "signature": "SAML XML signature wrapping attack: attacker injects malicious assertions that bypass signature validation",
  "signature_zh": "SAML XML 签名包装攻击：攻击者注入绕过签名验证的恶意断言",
  "regex": "SAML signature wrapping|XML signature wrapping|assertion ID mismatch",
  "domain": "security",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "SAML response parser validates the signature on the original assertion but processes a different, unsigned assertion injected via XML wrapping (e.g., using ID duplication or SOAP envelope manipulation), allowing attacker-controlled attributes.",
  "root_cause_type": "generic",
  "root_cause_zh": "SAML 响应解析器验证原始断言的签名，但处理通过 XML 包装（例如使用 ID 重复或 SOAP 信封操作）注入的未签名断言，从而允许攻击者控制的属性。",
  "versions": [
    {
      "version": "OpenSAML 4.3.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Shibboleth IdP 4.3.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "SimpleSAMLphp 1.19.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Microsoft AD FS 2019",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Okta SAML 1.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Attackers can place the malicious assertion before the signed one; parser may process the first unsigned assertion.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Wrapping attacks use well-formed XML that passes schema validation; the attack is structural, not syntactic.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Attackers can sign the malicious assertion with a stolen or self-signed certificate if the trust store is misconfigured.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Enforce strict assertion ID uniqueness and reject responses with duplicate IDs. Example in Java using OpenSAML: set `strictValidation=true` and configure `IdAttributeResolver` to check for duplicates.",
      "success_rate": 0.9,
      "how": "Enforce strict assertion ID uniqueness and reject responses with duplicate IDs. Example in Java using OpenSAML: set `strictValidation=true` and configure `IdAttributeResolver` to check for duplicates.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a whitelist of allowed assertion IDs or require that the signed assertion is the only one processed, ignoring any wrapped content.",
      "success_rate": 0.85,
      "how": "Use a whitelist of allowed assertion IDs or require that the signed assertion is the only one processed, ignoring any wrapped content.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Enforce strict assertion ID uniqueness and reject responses with duplicate IDs. Example in Java using OpenSAML: set `strictValidation=true` and configure `IdAttributeResolver` to check for duplicates.",
    "Use a whitelist of allowed assertion IDs or require that the signed assertion is the only one processed, ignoring any wrapped content."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf",
  "official_doc_section": null,
  "error_code": "SAML_SIGNATURE_WRAPPING",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-08-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}