Basically, open source software is no more or less safe than closed source software as hackers don’tuse the source to implant bugs. Each can be fixed accordingly with some time and effort. However, I can see why posting the bug fix publicly would seem like a bad idea as it gives the hackers another chance to mess it up. I can also see the problem with letting anyone add to the software. However, working, building, and learning together is a magnificent and evolved idea, in my opinion.
Both open source and closed source software are susceptible to hackers. There are advantages to both. Closed source software has less people analyzing the software, but they are also professionals who are paid for doing so. Open source is viewed and repaired by more people, but they are doing so voluntarily. Closed source has the advantage of hidden code. However, there are also more people using closed source code like Microsoft rather than open sourced software such as Linux. This could make them more likely to be targeted.
Overall, both are susceptible to hackers and bugs.