GHSA-h289-x5wc-xcv8

Suggest an improvement
Source
https://github.com/advisories/GHSA-h289-x5wc-xcv8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-h289-x5wc-xcv8/GHSA-h289-x5wc-xcv8.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-h289-x5wc-xcv8
Aliases
Published
2022-02-16T22:56:21Z
Modified
2024-05-20T21:13:34Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
Improper Validation of Certificate with Host Mismatch in mellium.im/xmpp/websocket
Details

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 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

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-295"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-02-16T22:56:21Z"
}
References

Affected packages

Go / mellium.im/xmpp

Package

Name
mellium.im/xmpp
View open source insights on deps.dev
Purl
pkg:golang/mellium.im/xmpp

Affected ranges

Type
SEMVER
Events
Introduced
0.18.0
Fixed
0.21.1