Microsoft allows you to create a recovery drive for Windows 10.
If Windows gets infected with a virus or other malware, can the USB driver also get infected while trying to reinstall Windows?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
Of course it can.
Either the OS created on the USB can be made out of a source that has been altered by the virus, either the virus alters the download if the USB stick is initialised with an image downloaded at the moment of the installation.
Even thought malwares usually have a specific task, a very good malwares could also alter the files that are copied when creating a USB stick or the ISO once downloaded
Definitely yes, even if your installation source is initially clean.
While trying to reinstall Windows, if you are connected to an infected network, both your operating system being installed and the USB stick you boot from (if not write protected) can get infected.
Recommendation: install the OS with no network connection, install anti-virus and then connect to network and update OS.