freerdp is vulnerable to out of bounds write. A malicious gateway might allow client memory to be written out of bounds. This issue has been resolved in version 2.4.1. If you are unable to update then use /gt:http
rather than /gt:rdp connections if possible or use a direct connection without a gateway.