Spectre: when the speed tricks of processors leak secrets
A design flaw in processors from Intel, AMD and Arm let programs read memory they should never see. How it works, what the fixes cost, and what to do now.

What to do now
- Install all updates for your operating system and browser: they include the protections against Spectre.
- Install processor updates (microcode) when your operating system or device maker offers them.
- Leave the protections switched on; Linux turns them on by default on vulnerable processors.
- Year
- 2018
- CVSS 3.1 score
- 5.6 medium
- Windows editions needed patches; 41 had them six days after disclosure
- 45
- slowdown with all Meltdown and Spectre fixes on Red Hat's tested workloads, with retpoline
- 1–8 %
- Reach met
The flaw sits in processors from Intel, AMD and Arm that are used in billions of devices, from smartphones to cloud servers (Spectre paper and researchers' site, 2018).
- Mass exploitation not met
No attack in the wild has been confirmed, and neither Spectre CVE is on CISA's list of exploited vulnerabilities (NVD, October 2026).
- Damage not met
No damage from attacks has been documented; the cost lay in the fixes, which made some systems slower.
- Extraordinary response met
Fixes from processor makers, operating systems, compilers and browsers at once, with Windows patches for 41 of 45 editions within six days (Microsoft, January 9, 2018).
| Affected | Processors from Intel, AMD and Arm, in billions of devices |
|---|---|
| CVE | CVE-2017-5753, CVE-2017-5715 |
| CVSS vector | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N |
| Weakness (CWE) | CWE-203 |
| Fixed in | No single fix: updates for operating systems, browsers, compilers and processor microcode, from January 3, 2018 |
| Found by | Google Project Zero and, independently, researchers from universities and companies |
- 1Reported to the vendor
- 2Made public six days early, together with the first updates+216 days
- 3The originally planned date; Windows patches out for 41 of 45 editions+222 days
On January 3, 2018, Google Project Zero and, independently, researchers from several universities and companies made public a flaw in the design of modern processors. Called Spectre, it lets a program trick the processor into revealing memory it should never be able to read, such as data of the operating system or of other programs. The affected processors from Intel, AMD and Arm are used in billions of devices, and according to Google, the flaw had been in most computers for nearly 20 years.
Spectre is not a bug in one product that a single update removes. It lies in the way processors work, so the fixes had to come from many sides at once.
How it worked
To stay fast, a modern processor does not wait until it knows which way a program will go next. It guesses and works ahead. This is called speculative execution. If the guess was wrong, the processor throws the results away. But it leaves traces in its cache, a small and fast memory that keeps recently used data close at hand.
Spectre comes in two variants. The first abuses a check that careful programs make: before they read entry number x of a list, they check that x lies inside the list. The attacker first trains the processor to expect that the check passes. Then the attacker asks for an entry far outside the list. While the check is still running, the processor guesses, reads a secret byte beyond the end of the list and uses it to load a piece of memory into the cache. The result is thrown away. But the attacker measures how fast different pieces of memory respond, sees which one was loaded and works out the secret byte from that.
In the second variant, the attacker trains the processor’s guesses for jumps in another program, such as the operating system or a hypervisor, the software that runs virtual machines in a cloud. The victim then briefly runs code fragments chosen by the attacker, which leak data in the same way.
- Attacker's programtrains the processor's guesses
- Processorguesses wrong and reads a secret byte ahead of time
- Cachekeeps a trace of the byte
- Timingfast and slow memory give the byte away
The attacker’s program must already run on the same device, the attack is hard to carry out, and it can read data but not change it. That is why the US National Vulnerability Database scores Spectre at only 5.6 of 10. Still, the attack worked in Google’s tests. With normal user rights, it read the memory of the kernel, the core of the operating system, at around 2,000 bytes per second. From inside a virtual machine, it read the kernel memory of the host machine at around 1,500 bytes per second.
Reach and the cost of the fixes
According to the researchers, almost every system is affected: desktops, laptops, cloud servers and smartphones. Google Project Zero’s test attacks ran on processors from all three makers: an Intel Xeon, two AMD processors and the Arm processor of a Nexus 5X phone.
Has Spectre been used in real attacks? The researchers’ answer is: “We don’t know.” No attack has been confirmed, and neither of the two Spectre CVEs is on the list of exploited vulnerabilities kept by the US agency CISA. In February 2021, a working exploit for Linux and Windows, a program that carries out the attack, was uploaded to VirusTotal, a service that checks files for malware, a security researcher reported. That is a ready-made tool, not an observed attack.
The price of Spectre was paid in speed. Some fixes stop processors from guessing certain jumps or make them clear their guesses more often, and that costs time. Most published measurements cover the fixes for Spectre and for Meltdown, a related processor flaw made public alongside it, together.
| Transaction databases, first fixes | 19 % | |
|---|---|---|
| Transaction databases, with retpoline | 8 % | |
| Data analysis and Java, first fixes | 7 % | |
| Data analysis and Java, with retpoline | 5 % | |
| Number crunching, first fixes | 5 % | |
| Number crunching, with retpoline | 2 % |
Red Hat, upper end of each measured range, for the Meltdown fix and both Spectre variants together. Retpoline, explained below, lowered the cost. As of March 2019.
Microsoft measured single-digit slowdowns on Windows 10 PCs with processors from around 2016 or newer. Older PCs and Windows Server slowed down more, especially when they read and wrote a lot of data. Google reported that it rolled out its fixes across its cloud without customers noticing: it received no support tickets about them.
The fix: many small repairs
Google Project Zero reported the flaw to Intel, AMD and Arm on June 1, 2017. A joint publication was planned for January 9, 2018, but Google went public six days early because reports had already appeared. According to Google, all of its cloud services had protections against all known variants by December 2017.
The fixes came from several sides, starting on January 3, 2018: updates for operating systems and browsers, new techniques in compilers, the tools that turn source code into programs, and microcode updates, which change the built-in control program of the processor. Microsoft released its first updates on January 3. Six days later, patches for 41 of the 45 Windows editions it supported were available through Windows Update.
| Variant | What the attacker abuses | Main defenses |
|---|---|---|
| 1, bounds check bypass | the guess that a check on a list will pass | barriers or masking in the program code, and programs rebuilt with them |
| 2, branch target injection | the guesses for jumps in other programs | retpoline in software, or new processor controls delivered by microcode |
Retpoline rewrites jumps in a program so that the processor’s guesses end up in a harmless loop. Google says it fully protects against the second variant without affecting its customers’ performance, and the Linux kernel turns it on by default on vulnerable processors. Newer processors have a hardware feature called enhanced IBRS, which limits the guessing of jumps; the kernel documentation describes it as more efficient than retpoline.
Sources
- Google Project Zero: reading privileged memory with a side channel projectzero.google
- Google Security Blog: today's CPU vulnerability and what you need to know security.googleblog.com
- Google Cloud: protecting customers from the new vulnerabilities without hurting performance cloud.google.com
- The researchers' site on Meltdown and Spectre, with FAQ spectreattack.com
- The Spectre paper (arXiv, January 2018) arxiv.org
- NVD: CVE-2017-5753 nvd.nist.gov
- Microsoft: performance impact of the Spectre and Meltdown fixes on Windows microsoft.com
- Red Hat: performance impact of the Meltdown and Spectre fixes access.redhat.com
- Linux kernel documentation on Spectre docs.kernel.org
- A security researcher on a working Spectre exploit found on VirusTotal (2021) dustri.org
Read next: MeltdownPrevious: ProxyLogonOverview: Vulnerabilities