In the app, under Settings > System > About My System, it lists the overall version and build, and the version and build of each unit. As to hacking the firmware, I highly doubt anybody could do it, without any insider access to the software. Also, why would anybody want to? There are certainly more accessible and/or profitable hacker opportunities than highjacking a music system.
Since the speakers should be behind the firewall of your router, you may want to inspect that firewall. I’ve not heard of any Sonos ‘attacks’ in years, since some people were putting their Sonos on the ‘outside’ of the firewall, something I believe Sonos now checks against. But that was an access hack, and not a firmware/software hack.
You can certainly use the controller to ‘check for updates’ which will look at what is installed, and replace it if it isn’t current. Normally speaking, installing a new device to your system does that, though. Most people factory reset a device before selling it, I also factory reset a used device (or an open box purchase from Best Buy) as a belt and suspenders kind of thing. A simple factory reset also checks the firmware running.
Frankly, the chances of a firmware hack are so close to zero as can be possible. Sonos speakers just don’t have enough access to data to be a worthwhile vector.
Edit @jgatie types faster than I do ;)
Thanks both for replying so quickly. I did factory reset both items on initial power up. The system did perform updates as I added both. So that all sounds as it should - I feel much better now!