GO-2022-0370

    Dashboard / Vulnerabilities / GO-2022-0370

    GO-2022-0370

    Published: 29 Jul 2022Last Modified: 20 May 2024

    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.

    Affected packages

    Package

    Name: mellium.im/xmpp

    Purl: pkg:golang/mellium.im/xmpp

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0.18.0
    Fixed -0.21.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GO-2022-0370 | CVE-DB