Skip to content
OAuth / SSO Advisory Advanced CVE-2023-48703

GHSL-2023-121: SAML authentication bypass vulnerability in RobotsAndPencils/go-saml - CVE-2023-48703

The go-saml library calls xmlsec1 without restricting the public key source, so an attacker can self-sign SAML assertions and embed their own public key. This allows authentication bypass in applications using go-saml for SAML signature verification.

p Follow

Originally disclosed on GitHub Security Lab

A SAML authentication bypass vulnerability was found in the archived go-saml library from Robots and Pencils. This issue may lead to authentication bypasses in applications using go-saml for the signature verification of SAML assertions.

p-, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The xmlsec1 command is called without the --enabled-key-data option, so it accepts keys embedded in the XML rather than only the trusted certificate.

Impact

This issue may lead to authentication bypasses in applications using go-saml for authentication purposes.

What the attacker needed

Application uses go-saml for SAML signature verification; attacker can craft and send a SAML response

The fix

The library is archived and unmaintained; projects should move to another SAML library or remove SAML support, or as a temporary workaround fork go-saml and add the --enabled-key-data argument (e.g. x509) when calling xmlsec1.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

SAML is a way for websites to log you in using a separate identity provider. The library checks the digital signature on the login message, but it does not force the check to use the identity provider's known public key. Instead, it accepts any key included in the message, so an attacker can sign a fake login message with their own key and be let in.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by p

View all

49 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.