Security implications of using --network=host

Dear all,
I am using the official mongo-docker-image, which I need to access from the host system (Linux-localhost). A convenient way to get around the well-known problems with the ufw firewall is to use the flag “–network=host”.
However, I am a little bit worried about possible security issues related to this hack. For that matter, I would like to ask: Is it safe to use this flag or are there any security risks for the host system?

Thanks in advance :slight_smile: