CVE-2025-59154 Details
Description
Openfire is an XMPP server licensed under the Open Source Apache License. Openfire’s SASL EXTERNAL mechanism for client TLS authentication contains a vulnerability in how it extracts user identities from X.509 certificates. Instead of parsing the structured ASN.1 data, the code calls X509Certificate.getSubjectDN().getName() and applies a regex to look for CN=. This method produces a provider-dependent string that does not escape special characters. In SunJSSE (sun.security.x509.X500Name), for example, commas and equals signs inside attribute values are not escaped. As a result, a malicious certificate can embed CN= inside another attribute value (e.g. OU="CN=admin,"). The regex will incorrectly interpret this as a legitimate Common Name and extract admin. If SASL EXTERNAL is enabled and configured to map CNs to user accounts, this allows the attacker to impersonate another user. The fix is included in Openfire 5.0.2 and 5.1.0.
A vulnerability in Openfire's SASL EXTERNAL mechanism for client TLS authentication allows for identity spoofing. This issue arises from the improper extraction of user identities from X.509 certificates. Instead of accurately parsing the structured ASN.1 data, the application retrieves a provider-dependent string that can include unescaped special characters. In certain environments, such as SunJSSE, this flaw enables a malicious certificate to manipulate the Common Name (CN) extraction process. If SASL EXTERNAL is enabled and configured to map CNs to user accounts, an attacker could impersonate another user. This vulnerability affects Openfire versions prior to 5.0.2 and 5.1.0, where the issue has been patched.
Users are advised to upgrade to Openfire versions 5.0.2 or 5.1.0, where this vulnerability has been fixed. For those using earlier versions, a temporary workaround involves replacing the default CN parsing logic with a custom implementation that correctly handles X.509 certificates. This can be done by creating a Java class that uses the proper parsing methods, packaging it into a JAR file, and placing it in Openfire's lib directory. After updating the configuration to use the new mapper, Openfire should be restarted.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 15, 2025CISA-ADP
Assessed Sep 15, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/igniterealtime/Openfire/blob/8d073dda36905da0fdee7cb623c025a01a5cbf6b/xmppserver/src/main/java/org/jivesoftware/util/cert/CNCertificateIdentityMapping.java#L43 | [email protected] | Source CodeVendor |
| https://github.com/igniterealtime/Openfire/security/advisories/GHSA-w252-645g-87mp | [email protected] | AdvisoryRemedyVendor |
| https://igniterealtime.atlassian.net/browse/OF-3122 | [email protected] | Issue TrackingPermission RequiredVendor |
| https://igniterealtime.atlassian.net/browse/OF-3123 | [email protected] | Issue TrackingPermission RequiredVendor |
| https://igniterealtime.atlassian.net/browse/OF-3124 | [email protected] | Issue TrackingPermission RequiredVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-290 | Authentication Bypass by Spoofing | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Ignite Realtime Openfire | < 5.0.2 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Sep 15, 2025 | New CVE Received | [email protected] |
Volerion