title: Java - What are the vulnerabilities of a port-listening program?
body: <p>I've recently created a fairly simple IRC client and server in Java but to make it fully functional I had to port forward. It occurred to me that there were probably some security issues with opening ports so I did some research. Everywhere, I found people saying that 'the biggest vulnerability is the program listening to the port'.</p>
  
  <p>So my questions are:</p>
  
  <ol>
  <li><p>What exactly can be exploited in a Java program which listens to a port and writes incoming data to a string? </p></li>
  <li><p>As the developer of the software, how can I prevent these vulnerabilities?</p></li>
  </ol>