Skip to main content

Wolfcore Cyber Security

Port 8883 (MQTT over TLS): Risks and How to Secure It

Written by Ruben Selby, founder and penetration tester at Wolfcore. Last reviewed 26 November 2026. Part of Ports, protocols and services.

In one sentence: Port 8883 is where an MQTT message broker, the “post office” for smart devices and sensors, accepts encrypted connections, and it is only as safe as the passwords, certificates and topic rules behind it.

What runs on this port

MQTT is a lightweight messaging protocol. Devices publish small messages to named topics, such as a temperature reading, and other devices or apps subscribe to those topics. A server called a broker passes the messages between them. Mosquitto is one widely used open-source broker.

IANA’s registry lists port 8883 as “secure-mqtt”, registered to OASIS, the standards body behind MQTT. It means MQTT wrapped in TLS, the same encryption layer used by HTTPS. The unencrypted version sits on a different port, covered in our port 1883 entry.

You find it in smart buildings, factories, cold-chain and fleet monitoring, hospitality systems, and SaaS products that talk to devices.

Why attackers look for it

Brokers on the internet can be found by internet-wide scanning and by search engines for devices such as Shodan. A listening 8883 tells an attacker “a broker is here”. TXOne’s research notes that real broker data, including odd topic names, shows up in Shodan results. Encryption hides the content from someone on the network path. It does not stop a client that is allowed to connect.

How it gets attacked

TLS protects the connection. These problems remain:

  • Anonymous or weak logins. If the broker accepts connections without a username, or uses weak passwords, anyone can join. Mosquitto’s documentation says anonymous access defaults to off, except when no listener is configured, where it turns on but only for local connections. Check your own config rather than assuming.
  • Wildcard subscriptions. TXOne describes how a client that can subscribe to the “#” wildcard can read every topic, and retained messages hand over the last value immediately.
  • No topic permissions. Without access control lists (ACLs), a connected client may publish to topics that control devices. TXOne cites a door-control style topic seen in Shodan data.
  • Certificates not checked. TLS without client certificate checks or with an expired or self-signed server certificate that clients ignore invites interception.
  • Old broker versions. The Mosquitto security page lists fixed issues such as CVE-2023-0809, where malicious initial packets that are not CONNECT packets caused excessive memory use, and CVE-2023-28366, a memory leak from duplicate QoS 2 message ids. Both are fixed in 2.0.16.
Sensor or app(client) TLS on 8883 Brokerlogin + topic rules TLS on 8883 Dashboard orcontrol system Encryption protects the journey. Logins and topic rules decide who may read or write.

Who it affects and how badly

Anyone running IoT or device messaging, including manufacturing, hospitality and retail estates, building management, telecoms and SaaS start-ups with connected products, in the UK, EU, US and Armenia.

  • Small business: a cheap broker on a cloud server for a few sensors. Worst case: readings exposed or a device switched by a stranger.
  • 50 to 250 staff: a factory or site network. Worst case: production data leaked, or commands sent to equipment, with downtime.
  • Regulated or critical sector: a broker feeding operational systems. Worst case: an outage, safety impact and regulator scrutiny. Network and information security duties such as NIS2 or sector rules may apply.

How to check whether yours is exposed

  1. List every broker you run, including those a supplier set up for you.
  2. Check your firewall or cloud security group for inbound rules to TCP 8883 from “any”.
  3. Ask your hosting provider or MSP which services listen on that port.
  4. Run the free scan at https://wolfcore.co.uk/free-web-vulnerability-scan/ for what is visible from outside, and check your own address ranges only.
  5. Check the broker version against the vendor’s security page.

How to secure it

  1. Do not expose the broker to the whole internet. Allow only your site, VPN or cloud network ranges.
  2. Turn off anonymous access and require a unique username and strong password per device, using the broker’s password file or an authentication plugin.
  3. Use client certificates where devices can hold them. In Mosquitto this is require_certificate with a trusted cafile, and certificate revocation can be handled with crlfile.
  4. Define ACLs so each device can only publish and subscribe to its own topics.
  5. Limit retained messages and wildcard subscriptions to what is needed.
  6. Set a modern minimum TLS version (tls_version in Mosquitto).
  7. Update the broker. Subscribe to the vendor’s security advisories.
  8. Log connections and alert on failed logins and new client IDs.

What we check on a test

  • Whether the broker answers from outside, and whether it allows an anonymous connection.
  • Whether an authenticated test device can read other devices’ topics or use the wildcard.
  • Whether a device can write to command topics it should not control.
  • Which TLS versions and certificate checks are enforced.
  • The broker version and whether it matches the vendor’s fixed releases.

Related terms

More in Ports and protocols, and see the full Resources register. Related: Port 1883 (MQTT), Ports 8080 and 8443, Port 2375 (Docker API), Ports 5060 and 5061 (SIP), Privilege escalation, Patch management.

To check which ports your business exposes, read about our penetration testing or start with the free web vulnerability scan.

FAQ

Is 8883 safer than 1883? It encrypts traffic with TLS. IANA lists it as the secure MQTT port. Logins and topic rules are still needed.

Does Mosquitto allow anonymous users by default? Its documentation says no, unless no listeners are defined, and then only local connections.

What does require_certificate do? It makes each client present a valid certificate before the connection proceeds.

How Wolfcore helps

A Wolfcore penetration test finds this the way an attacker would, by hand, not with a scanner. Start with the free web vulnerability scan and see penetration testing.

Wolfcore

Would your staff click a phishing email?

Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.

Start a free phishing testFree website security scanor book a 30 minute call