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.
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.
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
- Send a POST request to the SAMLPOSTProfileServlet with a SAMLResponse parameter containing a base64-encoded SAML response.
- The SAML response must have a Recipient matching the request URL and a Status of Success.
- The SAML response must include an Issuer that is in the Trusted Partners list.
- The SAML response must include a Subject with a NameIdentifier specifying the user to impersonate.
- 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.