Microsoft Internet Explorer (and windows too) would be an example of a closed source script. As we all know, there have been security issues. Firefox would be an example of an open source script. As we all know, there have been fewer security issues.
Both are vulnerable, and the most important thing to do is look at the history of the script you are considering. In phpLD, the data is sanitized on form field submissions, so most mods are pretty safe. It also depends on what you call a mod. Many of the so called mods are simply changes to the smarty templates, and are not actual PHP code changes, in which case there is virtually no additional risk.
I might also note that when we spot issues with phpLD mods (not just security issues) we often help mod developers improve their mods. This also sometimes works in reverse.
Educating yourself is the best thing you can do, as well as making sure you are working with good people.