Intel(r) Boot Guard is a technology which establishes a strong component based Static Root of Trust for verification and measurement (S-CRTV/S-CRTM). Protection is provided against malicious modification of the Initial Boot Block (IBB). A Boot Guard TOCTOU vulnerability in EDK II firmware was discovered that allows an attacker with physical access to achieve code execution after the Boot Guard ACM computes and validates the hash of the IBB and has extended firmware measurements into the TPM PCR0. This means the firmware will be marked as valid and have normal PCR0 values even though unsigned code has run. By using targeted SPI transactions to modify IBB code after IBB is verified, that code may later be fetched from SPI flash and executed after Non-Eviction Mode (NEM) is disabled after main memory is initialized. This attack requires physical access to the SPI flash.