Skip to content

Commit d86046a

Browse files
authored
zmqrpc localhost only (#4017)
* zmqrpc localhost only * add warning comment
1 parent 1984a5d commit d86046a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lmdeploy/pytorch/engine/mp_engine/zmq_rpc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def _task_callback(task: asyncio.Task) -> None:
3232
class AsyncRPCServer:
3333

3434
def __init__(self):
35-
address = 'tcp://*'
35+
# Warning: DO NOT allow visit rpc server from external network
36+
# unauthorized access may lead to code execution vulnerability
37+
address = 'tcp://localhost'
3638
self.context = zmq.Context()
3739
self.socket = self.context.socket(zmq.ROUTER)
3840
self.port = self.socket.bind_to_random_port(address)

0 commit comments

Comments
 (0)