Great article on highly voted programming errors – includes examples, workarounds, attacks.  Article is at http://cwe.mitre.org/top25/

 The 2010 CWE/SANS Top 25 Most Dangerous Programming Errors is a list of the most widespread and critical programming errors that can lead to serious software vulnerabilities. They are often easy to find, and easy to exploit. They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software from working at all.  (click on link above for more)