# CVE-2025-66621: Apache James SASL OAuthBearer/XOAUTH2 AUD claim validation bypass

Source: https://junglewise.ai/threats/cve-2025-66621-apache-james-sasl-oauthbearer-xoauth2-prior-versions-3-9-1-fails  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-06. Updated: 2026-11-06  
License: CC BY 4.0 with a link back

CVE-2025-66621 · Severity: info · Published 2026-11-06

Apache James is an open-source mail server that supports OAuth-based authentication. When OAuth introspection is not configured, the server fails to properly validate the audience (AUD) claim in authentication tokens, allowing attackers with valid credentials to access mailboxes they should not be authorized to use.

Technologies: [Apache James](https://junglewise.ai/threats/technologies/james). Vendors: [Apache](https://junglewise.ai/threats/vendors/apache).

## Quick answers

**Is CVE-2025-66621 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-66621 being exploited in the wild.

**How severe is CVE-2025-66621?** Informational severity, published 6 November 2026.

**Which products and versions are affected?** Apache James prior to 3.9.1.

**Is there a fix for CVE-2025-66621?** Yes: fixed in 3.9.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-66621 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2025-66621?** Check whether you run Apache James at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.9.1

## Technical details

The vulnerability exists in SASL OAuthBearer and XOAUTH2 authentication handlers in Apache James prior to version 3.9.1, which do not correctly validate the AUD (audience) claim of JWT payloads when token introspection is disabled. An attacker with valid OAuth credentials can exploit this to gain unauthorized access to the mail server by presenting a token with a missing or incorrect audience claim that should have been rejected.

## Affected products

- Apache James prior to 3.9.1

## Timeline

- 2026-11-06: disclosed

## References

- [https://lists.apache.org/thread.html/xz1g0blzcbxod69oktyq84h7t06xzov6](https://lists.apache.org/thread.html/xz1g0blzcbxod69oktyq84h7t06xzov6)

## Related threats

- [Apache James Mime4J resource exhaustion in MIME parsing](https://junglewise.ai/threats/cve-2026-85111-allocation-of-resources-without-limits-or-throttling-in-apache)
- [Apache James server JMAP webPush SSRF validation bypass](https://junglewise.ai/threats/cve-2026-76171-in-apache-james-server-prior-version-3-9-1-improper-validation-in)
- [Apache James path traversal in SieveFileRepository](https://junglewise.ai/threats/cve-2026-76168-in-apache-james-server-prior-version-3-9-1-relying-on-the)
- [Apache James ACL bypass in JMAP protocol](https://junglewise.ai/threats/cve-2026-49939-in-apache-james-server-prior-version-3-9-1-improper-access)
