Skip to content

Golang Misconfigured Interface Binding

What does this mean ?

Binding to all network interfaces can potentially open up a service to traffic on unintended interfaces, that may not be properly documented or secured. This plugin test looks for a string pattern “” that may indicate a hardcoded binding to all network interfaces.

What can happen ?

The clustered setup of Apache MXNet allows users to specify which IP address and port the scheduler will listen on via the DMLC_PS_ROOT_URI and DMLC_PS_ROOT_PORT env variables. In versions older than 1.0.0, however, the MXNet framework will listen on rather than user specified DMLC_PS_ROOT_URI once a scheduler node is initialized. This exposes the instance running MXNet to any attackers reachable via the interface they didn't expect to be listening on. For example: If a user wants to run a clustered setup locally, they may specify to run on But since MXNet will listen on, it makes the port accessible on all network interfaces.


Avoid listening on all interfaces by default.

std::string hostname = node.hostname.empty() ? "*" : node.hostname;

std::string addr = local ? "ipc:///tmp/" : "tcp://" + hostname + ":";

Sample Code

Vulnerable :

package main
import (
func main() {
    line, err := net.Listen("tcp", "")
    if err != nil {
    defer line.Close()