It could install software that transmits the data some time else. Basically something virus would do. The code can be hidden somewhere or loaded from somewhere with simple code.
Those are basic tactics used for years by malware. If just simply monitoring would be enough to protect against malware then we would have way less problems.
You should never run untrusted code or code by untrusted ppl.
I am talking about it in general. If you trust it or not depends on you. I am just saying that the argument that it is OS or that you can host the server yourself does not automatically mean that it is safe. That applies to any software.