Advisory

GO-2022-0370

Also known as: CVE-2022-24968, GHSA-h289-x5wc-xcv8, GHSA-m658-p24x-p74r

Summary

Man-in-the-middle attack due to improper validation of certificate in mellium.im/xmpp

Details

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.

Severity

Not rated by the source.

Dates

Published
2022-07-29 20:00 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

mellium.im/xmpp

Go · All systems

Affected

  • introduced 0.18.0, fixed 0.21.1 (semver)

Fixed versions

0.21.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences