Everyone laid off should be encouraged not judged for sharing the news of their availability with their network, just as much as one might boast when they achieve a milestone or get a new security certification.
And unfortunately ‘I’m searching for a new role’ without context leaves the reasons why open to wild, impersonal internet haters imagination to fill in the blank.
If your business had a broken lock on the door would it be ethical for a disgruntled former employee to tweet that fact out to the world after you laid him off? They may not be breaking in themselves, but they are substantially increasing the chance that someone else will.
These people aren't announcing a vulnerability (like in your broken lock analogy), they're announcing that they all got fired and that they all need references. It's also a strong signal to everyone that the company may not be a good place to apply for, for a security position.