The answers above are not completely comprehensive and don't touch on the realities at hand.
Firstly, the 'infection' is a program that runs in windows that systematically goes through your files and encrypts them... this type of system has been happening for years. Aside from the usual way of spreading itself, what is 'unique' is that it also scans your local network for devices that have a specific vulnerability (unpatched) and remotely infects those machines... this creates an army of devices on the local network if there are a lot of unpatched machines. This isn't fun when portable machines are involves (everyone comes into the office on Monday and someone is infected), etc...
Since most NAS systems run on non-windows stack, it is not possible for them to be infected by a windows program...
However, since a machine would have access to the data stored on the NAS (company file shares, etc..)... if that user has read/write access to files, those files are fare-game for being encrypted and held hostage... So if you have your backups or files shares on NAS, they can get encrypted and you are SOL... unless you have a not-accessible backup folder... and historical backups are stored there... Keep in mind, it might take days to just figure out you've been hit... so you need days worth of backups. Versioning systems would help, but you need to have lots over versions and the file system itself, can't be compromised.
It is a matter of time before they start getting more aggressive in this manner, so protect yourself now.
Way back in the day, machines would get viruses... isolated to a single machine. Then along came one that crawled networks shares... and instead of 'deleting' files (which you can undelete), it would over write the files with zero length size... effectively making it very, very hard (impossible at the time) to undo the damage... this is the same, but encrypting.
It's only a matter of time.