CVE-2022-24968
mediumpriority · track · 24EPSS 0.005 · 45 %ileEUUSEPSS · scored 2026-10-29
In Mellium mellium.im/xmpp through 0.21.0, an attacker capable of spoofing DNS TXT records can redirect a WebSocket connection request to a server under their control without causing TLS certificate verification to fail. This occurs because the wrong host name is selected during this verification.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- GHSA-h289-x5wc-xcv8Improper Validation of Certificate with Host Mismatch in mellium.im/xmpp/websocket2022-02-16ghsa · osvUS
### Impact If no TLS configuration is provided by the user, the websocket package constructs its own TLS configuration using recommended defaults. When looking up a WSS endpoint using the DNS TXT record method described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html) the ServerName field was incorrectly being set to the name of the server returned by the TXT record request, not the name of the initial server we were attempting to connect to. This means that any attacker that can spoof a DNS record (ie. in the absence of DNSSEC, DNS-over-TLS, DNS-over-HTTPS, or similar technologies) could redirect the user to a server of their choosing and as long as it had a valid TLS certificate for itself the connection would succeed, resulting in a MITM situation. ### Patches All users should upgrade to v0.21.1. ### Workarounds To work around the issue, manually specify a TLS configuration with the correct hostname. ### References - https://mellium.im/cve/cve-2022-24968/ - https://nvd.nist.gov/vuln/detail/CVE-2022-24968 ### For more information If you have any questions or comments about this advisory: * Reach out on XMPP to [sam@samwhited.com](xmpp:sam@samwhited.com?msg) * Email us at [sam@samwhited.com](mailto:sam@samwhited.com)
- GHSA-m658-p24x-p74rDuplicate Advisory: TLS certificate validation error in mellium.im/xmpp2022-02-12ghsa · osvUS
## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-h289-x5wc-xcv8. This link is maintained to preserve external references. ## Original Description In Mellium mellium.im/xmpp through 0.21.0, an attacker capable of spoofing DNS TXT records can redirect a WebSocket connection request to a server under their control without causing TLS certificate verification to fail. This occurs because the wrong host name is selected during this verification.
- GO-2022-0370Man-in-the-middle attack due to improper validation of certificate in mellium.im/xmpp2022-07-29vendor · osvUS
Websocket client connections are vulnerable to man-in-the-middle attacks via DNS spoofing. When looking up a WSS endpoint using a DNS TXT record, the server TLS certificate is incorrectly validated using the name of the server returned by the TXT record request, not the name of the the server being connected to. This permits any attacker that can spoof a DNS record to redirect the user to a server of their choosing. Providing a *tls.Config with a ServerName field set to the correct destination hostname will avoid this issue.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (6)
External citations — patches, advisories, analysis.
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan