I'm curious as to whether you can be infected with malware by using a proxy? I currently process data using Python but occasionally I encounter recaptcha, so I'm looking to implement proxy support.

The data processing is simply an experimental project. So of course my priority is the state of my computer and so I want to get a better insight of malware via proxies before I establish a connection with one via python, the connection would be made via TCP.

Also I'm not necessarily looking for a in-depth answer as I assume if this is possible there's multiple scenarios, so just a simple yes/no and brief explanation would be great.

  • 1
    Your description is a little unclear. A proxy will not protect you against malware.
    – Overmind
    Feb 6, 2020 at 6:48

1 Answer 1


A proxy forwards all traffic and therefore has the possibility to also modify the traffic and thus also to modify the traffic in a malicious way, including making the client download malware or exploiting bugs in the client processing the traffic. This is definitely true for plain HTTP but is also true for HTTPS if the client does not properly check the certificate. The latter is often true for web scraping programs (like your project) which often explicitly ignore certificate errors in order to get to the content.

If this is a trusted proxy you control yourself this is likely not an issue. If you instead use an untrusted third-party proxy (which seems to be the case here) then the chance is much higher that the proxy will be malicious. If you treat all data you get as strictly untrusted and potentially malicious and thus properly sanitize these before doing any actions on these this might not be a problem though.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .