REDHAT-BUG-2525547: High severity Dovecot dovecot vulnerability
An attacker that holds a token intended for a different purpose can authenticate, because when an OAuth2 token response does not contain a scope claim, the audience claim is used in its place and checked against the configured required scopes. These are different concepts, and the audience claim does not describe what a token is allowed to do. A token that grants no relevant permissions can be accepted because its intended recipient value happens to match a configured scope name, granting access that should have been denied. It also hides an identity provider misconfiguration where scopes are not being issued at all. Ensure the identity provider issues a scope claim for all tokens used with Dovecot, and that configured scope names do not match audience values. Update to non-vulnerable version. No publicly available exploits are known.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Configure the identity provider to issue a scope claim for every token used with Dovecot.
Identity provider scope claim = issued for all tokens used with Dovecot - Configuration
Ensure configured scope names do not match token audience values.
Dovecot OAuth2 configuration configured scope names = must not match audience values
Event History
Frequently Asked Questions
Who is exposed to this issue?
Dovecot deployments that use OAuth2 authentication are exposed when their identity provider does not include a scope claim in tokens and an audience value matches a scope configured as required by Dovecot.
What must an attacker have to exploit it?
An attacker needs a token intended for a different purpose. Exploitation depends on that token lacking a scope claim while its audience claim matches a configured required scope name.
What can be done before updating?
Configure the identity provider to issue a scope claim for every token used with Dovecot. Also ensure configured Dovecot scope names do not match audience values.
How can I identify a potentially affected configuration?
Inspect OAuth2 tokens used with Dovecot to determine whether they contain a scope claim. Review Dovecot required-scope configuration and identify any configured scope names that also appear as token audience values.
Are public exploits available?
No publicly available exploits are known.