The vulnerability lies in how OpenAM processed private_key_jwt client authentication assertions. The core issue is a failure to properly bind the identity of the client being authenticated to the cryptographic key used for validation. This was caused by two main flaws, which were fixed in the patch.
First, in ClientCredentialsReader.verifyJwtBearer, the code did not enforce the requirement from RFC 7523 that the JWT's iss (issuer) and sub (subject) claims must be identical for client authentication. It proceeded to look up the client registration based on the sub claim, even if the iss claim pointed to a different client.
Second, and more critically, in OpenAMClientRegistration.byJWKsURI, the mechanism for retrieving the JSON Web Key Set (JWKS) to validate the JWT signature was flawed. It used a shared cache of key resolvers keyed by the JWT's iss claim. This meant an attacker could register their own client, which would populate the cache with a resolver for their keys. Then, by crafting a JWT with their client ID as the iss and the victim's client ID as the sub, they could trick the system into using their own keys to validate an assertion for the victim's client.
The patch addresses both issues. It adds a strict check in ClientCredentialsReader.verifyJwtBearer to ensure iss equals sub. It also replaces the flawed shared resolver cache with a new cache, ClientJwksResolverCache, which keys resolvers by a combination of the client ID and its configured jwks_uri. This ensures that the keys used for validation are always the ones belonging to the client being authenticated, preventing the impersonation attack.