Skip to content

CWE-295: TrustAny.java — Public Utility Class that Trusts All Certificates and Hostnames #1

Description

@LeoWSY-hashblue

Summary

SMQ ships TrustAny.java, a public utility class providing TrustManager (trusts all certs) and HostnameVerifier (accepts all hostnames). Intended for development but available as public API.

Vulnerable Code (Java/RTL/SMQ/TrustAny.java)

static public TrustManager[] cert() // trusts everything
static public HostnameVerifier hostName() // returns true always

Impact

Any SMQ client calling TrustAny.cert() or TrustAny.hostName() gets zero TLS security.

Fix

Remove from public API or gate behind explicit dev-mode flag.

Severity

CVSS 7.4 (HIGH) — CWE-295

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions