License != security. They are unrelated.
However, a popular GPL (or MIT, or other open-source licenses) licensed software is generally audited by more users than a closed sourced one, for obvious reasons (because the source code is open, duh). For an example, Ubuntu would be audited by much more users than Windows. Hence, if something is vulnerable, it would have better chance of being seen by someone and eventually being patched.