Skip to main content

Security Exposure

Shadowserver scans for MQTT brokers on 1883 and 8883 and flags instances that allow anonymous access, which can be abused to leak data. Traffic on 1883 is unencrypted, so even password-protected brokers can disclose credentials and message content on the wire. Mosquitto releases before 2.0 allowed clients to connect without authentication by default.

Hardening

  • Disable anonymous access on the broker and require per-client credentials or client certificates.
  • Use MQTT over TLS on 8883 and disable the plaintext 1883 listener where clients support TLS.
  • Restrict which topics each client may publish or subscribe to with broker access control lists (for example Mosquitto's acl_file or ACL plugins).
  • Keep brokers off the public internet or behind a firewall that admits only known device networks.

Monitoring

Log client connections and authentication failures on the broker, and alert on subscriptions to wildcard topics from unexpected clients. Watch for new hosts listening on 1883.

Frequently Asked Questions

What is the difference between port 1883 and 8883?→

Port 1883 is registered for MQTT without TLS and port 8883 for MQTT over TLS, according to the MQTT 5.0 specification. Plaintext 1883 exposes credentials and payloads on the network.

Is MQTT port 1883 TCP or UDP?→

MQTT runs over TCP. IANA lists both transports for the registration, but the MQTT specification defines TCP, TLS and WebSocket as transports.

Does Mosquitto allow anonymous connections?→

Mosquitto 2.0 and later requires authentication options to be chosen explicitly before clients can connect. Earlier versions allowed unauthenticated clients by default.

Port assignments from the IANA Service Name and Transport Protocol Port Number Registry. Services can be configured to run on any port, so traffic on port 1883 is not guaranteed to be MQTT. Exploited-in-the-wild data from the CISA KEV catalog (CC0).