Is there any way of protecting against this whilst still allowing for users to flash upgrade to later firmware ?
You'll have to ask Paul.. However, in my past experiences, having users do things like firmware flashing is in general, a really bad idea.