Antivirus software works by inspecting the inside of files on a computer. Many of these files are software owned by a third party and governed by their own EULAs, often with specific clauses about inspecting the inside of those files (e.g. reverse engineering). What legal doctrine is used to authorize antivirus software to inspect third party intellectual property?
First, scanning software for viruses or malware is arguably different from reverse engineering. The anti-virus software is not attempting to duplicate the functionality of the scanned software, and it doesn't generate any sort of report on how the scanned software works.
Second, it will depend specifically on what terms are stated in the EULA. For example, the license for Microsoft Windows says
[you may not] reverse engineer, decompile, or disassemble the software, or attempt to do so, except and only to the extent that the foregoing restriction is (a) permitted by applicable law;
Note that there is no prohibition on "inspecting the inside of the files". Anti-viral software may be inspecting the software, but it is not reverse engineering, decompiling, or disassembling it, so it would not be in violation of the license.
Finally, while a EULA might try to include some language forbidding examination by anti-virus software, the concept of fair use might provide a defense. In Sega Enterprises Ltd. v. Accolade, Inc a US court ruled that in certain circumstances, reverse engineering might be allowed despite license terms to the contrary under the fair use doctrine.