[CVE-2021-29156 on ForgeRock OpenAm] LDAP Injection in Webfinger Protocol!
The ForgeRock OpenAM instance was vulnerable to LDAP injection through the Webfinger protocol. An unauthenticated attacker could retrieve password hashes character by character, or obtain a session token or private key.
Originally disclosed on HackerOne
- Triaged in 47 hours
- Fixed in 24 days
- Disclosed after 24 days
Description: https://████████ is vulnerable to CVE-2021-29156.
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-29156
- https://portswigger.net/research/hidden-oauth-attack-vectors
- https://github.com/projectdiscovery/nuclei-templates/blob/74db4223c11d27a934ca1c417aa4abca9e70ad35/cves/2021/CVE-2021-29156.yaml
Impact
ForgeRock OpenAM before 13.5.1 allows LDAP injection via the Webfinger protocol. For example, an unauthenticated attacker can perform character-by-character retrieval of password hashes, or retrieve a session token or a private key.
System Host(s)
████████
Affected Product(s) and Version(s)
CVE Numbers
CVE-2021-29156
Steps to Reproduce
The references mentioned shall be helpful for successful reproduction.
Suggested Mitigation/Remediation Actions
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
Likely the Webfinger endpoint passed user-supplied input into an LDAP query without proper escaping, allowing the query logic to be altered.
Impact
An unauthenticated attacker could extract password hashes character by character, or retrieve a session token or private key.
What the attacker needed
Unauthenticated access to the Webfinger endpoint
The fix
Versions before 13.5.1 are affected; upgrading to 13.5.1 or later would avoid this issue.
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.
LDAP is a directory service that many companies use to store user accounts and passwords. An injection bug means the attacker can slip extra instructions into a query the server sends to that directory, so the server answers questions it should not. Here the attacker could slowly read out secret values such as password hashes or session tokens without logging 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.