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

GHSL-2023-143_GHSL-2023-144: SAML signature validation bypass in OpenAM - CVE-2023-37471

OpenAM up to version 14.7.2 does not properly validate the signature of SAML responses, allowing an attacker to impersonate any user, including the administrator, by sending a crafted SAML response to the SAMLPOSTProfileServlet. A second issue allows an open redirect via the target parameter.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

OpenAM up to version 14.7.2 does not properly validate the signature of SAML responses received as part of the SAMLv1.x Single Sign-On process. Attackers can use this fact to impersonate any OpenAM user, including the administrator, by sending a specially crafted SAML response to the SAMLPOSTProfileServlet servlet.

ghsecuritylab, 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 signature validation method only checks the signature if the response is marked as signed, but the default value for 'signed' is false and 'valid' is true, so an unsigned response is considered valid.

Impact

This issue may lead to user impersonation in OpenAM, allowing an attacker to log in as any user, including the administrator.

What the attacker needed

SAMLv1 SSO enabled; Issuer in Trusted Partners list; network access to the servlet

The fix

The fix was merged in a pull request and an advisory was published.

How it was found

  1. Send a POST request to the SAMLPOSTProfileServlet with a SAMLResponse parameter containing a base64-encoded SAML response.
  2. The SAML response must have a Recipient matching the request URL and a Status of Success.
  3. The SAML response must include an Issuer that is in the Trusted Partners list.
  4. The SAML response must include a Subject with a NameIdentifier specifying the user to impersonate.
  5. The servlet processes the response and returns a session cookie iPlanetDirectoryPro.

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 different websites to share login information. OpenAM is a server that handles logins. The bug is that OpenAM didn't check if the login message was really signed by a trusted party, so an attacker could fake a message and log in as anyone.

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 ghsecuritylab

View all

132 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.