UA isn’t the cause of security issues the same thought process or lack there off that led to UA being used as a proxy for compatibility in this cause is.
But in a more general view reliance on an unreliable and user controlled data for decision making is a pretty common pitfall in the security world.