Suppose I used the user agent header to look at which browser (if any) is being used in order to help me defend against potential CSRF attacks. While I understand that there is a myriad of CSRF defenses that don't require the user agent header, I just want to know how safe the user agent header is -- could a CSRF attacker modify it to whatever he wishes?
I know that the origin header and referer header are well-protected from such modifications, since they are forbidden headers. The user-agent header, however, does not appear to be.
Does this mean a CSRF attacker can trivially change the user-agent header? According to this, it can't be done. But I wonder why, then, it isn't listed as 'forbidden'. Is there something I'm misreading? Is it as protected as the Referer and Origin headers?
Thanks in advance.