Can a YubiKey Be Hacked? What Is Actually Known (2026)
On this page, 3 sections
YubiKey is a popular security key that provides an extra layer of protection for online accounts. But can a YubiKey be hacked?
Short answer: for the way most people use it, as a security key for logins, no practical hack is known. Two real flaws have been published. ROCA (2017) weakened RSA keys generated on YubiKey 4 for PIV and OpenPGP, and did not affect FIDO logins.
EUCLEAK (2024) needs the key in the attacker’s hands, special lab equipment and, in most setups, your PIN or password too. Here is what is actually known.
How does YubiKey Security Work?
YubiKey is a type of security key that provides an additional layer of protection to online accounts. It is a physical device that generates a one-time password (OTP) or uses public-key cryptography to authenticate users. The device is a small, USB or NFC-enabled key that can be plugged into a computer or mobile device.

YubiKey uses the FIDO (Fast Identity Online) protocol, which is designed to make online authentication simpler and more secure. FIDO is an open standard that is supported by major tech companies like Google, Microsoft, and Facebook. The protocol uses public-key cryptography to secure online accounts and can replace passwords entirely with passkeys.
It also supports the U2F (Universal 2nd Factor) protocol, which is a FIDO-compliant standard for two-factor authentication. U2F is a simple and secure way to protect online accounts against phishing and other types of attacks. The protocol uses a hardware key to authenticate users and provides a higher level of security than traditional two-factor authentication methods.
Get the lowdown on YubiKey vs Password Managers – find out which one’s better for keeping your online stuff safe. Dive into our detailed guide and pick what suits you best!
Common Attack Vectors on Yubikey Hardware Keys
While YubiKey is designed to be secure, it is not immune to attacks. The earlier real case is ROCA (2017): a flaw in Infineon’s library made RSA keys generated on YubiKey 4 (firmware 4.2.6 to 4.3.4) for PIV and OpenPGP weak enough that the private key could be computed from the public key alone. FIDO U2F, Yubico OTP and OATH were not affected, and Yubico ran a key replacement program (Yubico advisory YSA-2017-01).
The newer case is EUCLEAK, published in 2024: a side-channel flaw in the Infineon crypto library used by YubiKey 5 Series and Security Key Series keys on firmware older than 5.7. Per Yubico advisory YSA-2024-03, an attacker needs physical possession of the key, specialized equipment and a sophisticated targeted attack, plus in many cases your account password or device PIN. Yubico rated it Moderate (CVSS 4.9). Keys on firmware 5.7 or newer are not affected. Common attack vectors on hardware keys in general are physical attacks, side-channel attacks and firmware vulnerabilities.

Physical attacks involve physically accessing the device and extracting sensitive information from it. Side-channel attacks involve monitoring the power consumption or electromagnetic radiation of the device to extract sensitive information. Firmware vulnerabilities can be exploited to gain access to the device and extract sensitive information.
One thing surprises people: YubiKey firmware cannot be updated. Yubico says not allowing firmware updates is its chosen practice to maximize key security (same advisory). So the fix for EUCLEAK is a newer key, not an update. You can see your firmware version in the Yubico Authenticator app.
Find out if a single YubiKey can be used across multiple accounts.
How to Protect Your YubiKey from getting Hacked?
To ensure the security of your YubiKey, it is important to follow best practices for its usage. Here are some tips to help you:
- Always keep your YubiKey in a safe place, such as a secure drawer or a safe.
- Do not share your YubiKey with anyone else.
- Set a FIDO2 PIN on your YubiKey, so a found key cannot be used on its own.
- Use your YubiKey with two-factor authentication (2FA) to provide an additional layer of security.
- Use a backup key in case your primary YubiKey is lost or stolen.
- Use a password manager to store your login credentials securely.
What to do if YubiKey Gets Hacked?
If you suspect that your YubiKey has been compromised, take the following steps:
- Immediately change your password.
- Check your account activity to see if there have been any unauthorized logins.
- Contact the support team of the service you are using your YubiKey with to report the incident.
- If necessary, revoke the compromised YubiKey and replace it with a new one.
Remember that YubiKeys are hardware security keys that provide an additional layer of security to your online accounts.
However, they are not immune to hacking attempts. By following these best practices and responding appropriately to suspected compromises, you can help protect your YubiKey and the accounts it secures.
Related YubiKey guides
- YubiKey vs YubiKey 5- What’s the Difference? (With Comparison Table)
- Bitwarden YubiKey Setup: FIDO2 (Free) or OTP (Premium) Explained
- Titan Security Key vs YubiKey: What Differs on the Spec Pages
Frequently Asked Questions
How can a YubiKey be compromised if lost or stolen?
If an attacker gains access to a lost or stolen YubiKey, they would usually still need your password or the key’s PIN to get in. The YubiKey is designed to be extremely difficult to compromise without physical access.
That being said, it is still important to take precautions to protect your YubiKey, such as keeping it in a safe place and using a strong PIN.
What are the risks of using YubiKey on Android devices?
YubiKeys can be used with Android devices, but there are some security concerns to be aware of. For example, if an attacker gains physical access to the device, they may be able to use the YubiKey to gain access to the user’s accounts. Additionally, some Android devices may not support all of the features of the YubiKey, which could limit its effectiveness.
Is it possible for a YubiKey 5 NFC to be cloned or tampered with?
While it is theoretically possible for a YubiKey to be cloned or tampered with, it is extremely difficult to do so. YubiKeys are designed to be highly resistant to physical and electronic tampering, and they use advanced encryption algorithms to protect against cloning and other attacks.
How does YubiKey stand up against phishing and other hacking attempts?
YubiKey is designed to protect against a wide range of attacks, including phishing, man-in-the-middle attacks, session hijacking, and data breaches where passwords are stolen. By requiring physical access to the device in order to authenticate, YubiKey provides an additional layer of security that can help prevent these types of attacks.
Can malware affect the functionality of a YubiKey?
While it is possible for malware to affect the functionality of a YubiKey, it is extremely rare. YubiKeys are designed to be highly secure and resistant to attacks, and they use advanced encryption algorithms to protect against malware and other threats.
What measures should be taken to ensure the security of my YubiKey?
To ensure the security of your YubiKey, it is important to keep it in a safe place and use a strong PIN. Additionally, you should avoid sharing your YubiKey with others and be careful when using it on public computers or networks.
Finally, it is important to keep your YubiKey firmware version in mind: YubiKey firmware cannot be updated, so a key older than firmware 5.7 is replaced, not patched.