GHSA-H289-X5WC-XCV8
Vulnerability from github – Published: 2022-02-16 22:56 – Updated: 2024-05-20 21:13Impact
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 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 * Email us at sam@samwhited.com
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "mellium.im/xmpp"
},
"ranges": [
{
"events": [
{
"introduced": "0.18.0"
},
{
"fixed": "0.21.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-24968"
],
"database_specific": {
"cwe_ids": [
"CWE-295"
],
"github_reviewed": true,
"github_reviewed_at": "2022-02-16T22:56:21Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Impact\n\nIf 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.\n\n### Patches\n\nAll users should upgrade to v0.21.1.\n\n### Workarounds\n\nTo work around the issue, manually specify a TLS configuration with the correct hostname.\n\n### References\n\n- https://mellium.im/cve/cve-2022-24968/\n- https://nvd.nist.gov/vuln/detail/CVE-2022-24968\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Reach out on XMPP to [sam@samwhited.com](xmpp:sam@samwhited.com?msg)\n* Email us at [sam@samwhited.com](mailto:sam@samwhited.com)\n",
"id": "GHSA-h289-x5wc-xcv8",
"modified": "2024-05-20T21:13:34Z",
"published": "2022-02-16T22:56:21Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mellium/xmpp/security/advisories/GHSA-h289-x5wc-xcv8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24968"
},
{
"type": "WEB",
"url": "https://github.com/mellium/xmpp/pull/260"
},
{
"type": "WEB",
"url": "https://github.com/mellium/xmpp/commit/0d92aa486da69b71f2f4a30e62aa722c711b98ac"
},
{
"type": "PACKAGE",
"url": "https://github.com/mellium/xmpp"
},
{
"type": "WEB",
"url": "https://mellium.im/cve/cve-2022-24968"
},
{
"type": "WEB",
"url": "https://mellium.im/issue/259"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2022-0370"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Improper Validation of Certificate with Host Mismatch in mellium.im/xmpp/websocket"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.