I have a USB flash drive with became spontaneously write-protected (no switch). When I ran DiskPart, I got the following result:
DISKPART> detail disk
UFD USB Flash Drive USB Device
Disk ID: C3072E18
Type : USB
Status : Online, Healthy
Path : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : Yes
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No
DISKPART> detail disk
UFD USB Flash Drive USB Device
Disk ID: C3072E18
Type : USB
Status : Online, Healthy
Path : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : Yes
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No