{"id":"GHSA-2vg8-q4c2-5cw3","summary":"OpenAM has LDAP Injection via `_queryId` Parameter","details":"OpenAM (Open Identity Platform) is an open-source IAM platform providing SSO, OAuth2, SAML, and OpenID Connect capabilities. The CREST REST API layer exposes user query endpoints under `/json/{realm}/users`. In `IdentityResourceV1.queryCollection()`, the HTTP query parameter `_queryId` is passed to a `CrestQuery` object with `escapeQueryId` **explicitly set to `false`**, bypassing the escape protection introduced as part of the CVE-2021-29156 fix. The unescaped value flows directly to `DJLDAPv3Repo.getFilter()` where it is concatenated into an LDAP filter string without sanitization, enabling authenticated attackers to inject arbitrary LDAP metacharacters for user enumeration and blind LDAP injection.\n\n\n## Affected Endpoint\n\n| Endpoint | Auth Required | Injection Parameter |\n|----------|--------------|---------------------|\n| `GET /openam/json/{realm}/users?_queryId=\u003cINJECTION\u003e` | SSO Token | `_queryId` |\n| `GET /openam/json/{realm}/groups?_queryId=\u003cINJECTION\u003e` | SSO Token (TBD) | `_queryId` |\n\n## Background: CVE-2021-29156\n\nCVE-2021-29156 was a pre-authentication LDAP injection in OpenAM's Webfinger endpoint, where user-supplied input reached `DJLDAPv3Repo.getFilter()` unescaped. The fix introduced the `escapeQueryId` flag in `CrestQuery` (defaulting to `true`) and added `Filter.escapeAssertionValue()` in the filter-building path:\n\n## Credit\n\nDiscovered by **JD-Security SHENYI Team**","aliases":["CVE-2026-41573"],"modified":"2026-06-22T20:26:28.864612Z","published":"2026-06-22T19:59:33Z","database_specific":{"cwe_ids":["CWE-74"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-06-22T19:59:33Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/OpenIdentityPlatform/OpenAM/security/advisories/GHSA-2vg8-q4c2-5cw3"},{"type":"PACKAGE","url":"https://github.com/OpenIdentityPlatform/OpenAM"},{"type":"WEB","url":"https://github.com/OpenIdentityPlatform/OpenAM/releases/tag/16.1.1"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-8984-9gww-h52x"}],"affected":[{"package":{"name":"org.openidentityplatform.openam:openam-core-rest","ecosystem":"Maven","purl":"pkg:maven/org.openidentityplatform.openam/openam-core-rest"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"16.1.1"}]}],"versions":["14.5.2","14.5.3","14.5.4","14.6.1","14.6.2","14.6.3","14.6.4","14.6.5","14.6.6","14.7.0","14.7.1","14.7.2","14.7.3","14.7.4","14.8.1","14.8.2","14.8.3","14.8.4","15.0.0","15.0.1","15.0.2","15.0.3","15.0.4","15.1.0","15.1.1","15.1.2","15.1.3","15.1.4","15.1.5","15.1.6","15.2.0","15.2.1","15.2.2","16.0.1","16.0.2","16.0.3","16.0.4","16.0.5","16.0.6","16.1.0"],"database_specific":{"last_known_affected_version_range":"\u003c= 16.0.6","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-2vg8-q4c2-5cw3/GHSA-2vg8-q4c2-5cw3.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"}]}