Visitar URL original
Java: CWE-347 Query for detecting Signature Exclusion Attack with SAML assertion by luchua-bc · Pull Request #6935 · github/codeql · GitHub
The Wayback Machine - https://web.archive.org/web/20211025232751/https://github.com/github/codeql/pull/6935
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: CWE-347 Query for detecting Signature Exclusion Attack with SAML assertion #6935

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

@luchua-bc
Copy link
Contributor

@luchua-bc luchua-bc commented Oct 22, 2021

SAML (Security Assertion Markup Language) is an XML-based markup language for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider. It is used for security assertions, which are statements that service providers use to make access-control decisions. SAML response messages consist of issuer, assertion (subject, conditions, and statements), signing key, and signature.

If SAML token does not contain any signature, no protection of integrity or authenticity is provided. Since no digital signature for the token is required, an attacker can generate tokens containing arbitrary identities of other users.

Java applications use the JAXB (Java Architecture for XML Binding) API for unmarshalling (reading) XML instance documents into Java content trees, and then marshalling (writing) Java content trees back into XML instance documents. The Java XML Digital Signature APIs are specified in JSR-105 and are implemented in the javax.xml.crypto package, which are used to verify signature of SAML XML documents.

The query detects missing signature check against SAML assertion XML documents. Please consider to merge the PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant