Get the factory image from Google and extract the following files from it:
- bootloader-grouper-4.23.img
- boot.img
- system.img
- UPDATE-SuperSU-v1.51.zip
and copy it to /sdcard and be sure, that you have a custom recovery installed on your device.
Then do a nandroid backup before starting (it's always better to have it) and then do a
fastboot flash bootloader bootloader-grouper-4.23.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
reboot into recovery and flash UPDATE-SuperSU-v1.51.zip
Do a reboot system and, congrats, you should be on Android 4.3 without loosing any data.