Summary
A critical authorization flaw in OpenDJ's SASL PLAIN handling can allow an authenticated account with the PROXIED_AUTH privilege to assume another resolvable user's identity without satisfying the applicable proxy access controls. The issue becomes risky when authorization identities are resolved without enforcing the target user's permitted proxy ACI scope.
Affected context
The vulnerability occurs in OpenDJ deployments using the legacy server's SASL PLAIN authorization identity handling. It affects cases where an authenticated account has the PROXIED_AUTH privilege, the supplied authorization identity resolves to a different user, and the implementation checks the privilege without also evaluating the target identity's mayProxy ACI permissions.
Exploit preconditions
- Attack surface: LDAP authentication and authorization through the SASL PLAIN mechanism
- Required access: An authenticated directory account with the PROXIED_AUTH privilege
- Target condition: The requested authorization identity must resolve to a different, non-root directory identity
- Trigger point: Authorization identity processing during SASL authentication
- Why exploitation is possible: The authorization path validates the broad proxy privilege but omits the target-specific mayProxy ACI scope before accepting the identity
Why this happens
The underlying bug is an incomplete authorization decision in the SASL PLAIN authorization identity path. OpenDJ verified that the requester held the PROXIED_AUTH privilege, but did not consistently enforce whether the requester was permitted to proxy as the specific resolved target identity under the mayProxy ACI.
This maps primarily to CWE-285: Improper Authorization, because a valid privilege was treated as sufficient without applying the required resource-specific access control. It is also related to CWE-639: Authorization Bypass Through User-Controlled Key, since attacker-controlled authorization identity values could select another directory identity outside the permitted proxy scope.
Potential impact
- An authenticated account may impersonate other resolvable directory users
- Attackers could access LDAP resources under the target identity's permissions
- Sensitive directory data may be disclosed or modified
- Administrative or application workflows could be performed with elevated privileges
- Identity-based auditing and accountability may be weakened
General mitigation guidance
Mitigation focuses on making proxy authorization a target-specific, deny-by-default decision rather than relying only on a broad privilege.
Common defensive patterns include:
- Enforcing mayProxy ACI evaluation for every resolved authorization identity
- Rejecting unauthorized identity transitions before password or session acceptance
- Treating all user-supplied authorization identity forms consistently
- Applying least privilege to accounts granted proxy-related capabilities
- Separating authentication, identity selection, and authorization checks
- Maintaining explicit audit records for successful and rejected identity proxy operations
- Using the vendor-provided fixed maintenance release and validating equivalent behavior in deployment testing
How teams detect issues like this
Detection and review approaches can include:
- Static analysis and code review for privilege checks that are not followed by resource- or identity-specific authorization checks
- Tests covering dn:, u:, and bare authorization identity forms
- Negative authorization tests for identities outside the requester's mayProxy ACI scope
- LDAP audit monitoring for unusual proxy identity transitions or access to unrelated user entries
- Policy checks requiring deny-by-default behavior when authorization identities resolve ambiguously or unexpectedly
- Automated security review tools that flag user-controlled identity selectors used without corresponding authorization enforcement

