CyberArk Glossary >

What is Certificate Pinning?

Certificate pinning is a cybersecurity practice where a specific certificate or public key is “pinned” to an application or browser, allowing only the pinned certificate to establish a secure connection with the server. When a mobile app or browser attempts to communicate with a server, it checks whether the server’s certificate matches the pinned certificate. If it doesn’t, the connection is blocked, effectively reducing the risk of an attack.

With cyber threats constantly evolving, certificate pinning has become a crucial defense mechanism, especially in preventing Man-in-the-Middle (MITM) attacks. In a typical certificate-based connection, if an attacker compromises the certificate authority (CA), they could impersonate the server. However, with certificate pinning, even if the CA is compromised, the connection will fail if the attacker’s certificate doesn’t match the pinned certificate.

For businesses with sensitive data, certificate pinning is invaluable for ensuring secure, uninterrupted communications.

How Does Certificate Pinning Work

Certificate pinning leverages SSL/TLS mechanisms to ensure that communication is secure.

When a client initiates a connection to a server, it verifies the server’s identity by checking the SSL/TLS certificate. Certificate pinning adds an additional layer by verifying that the certificate presented matches a pinned version. If the pinned certificate is verified, the connection proceeds. If not, the client halts the connection, keeping the communication secure.

Key Benefits of Certificate Pinning

  • Protection Against MITM Attacks: Certificate pinning protects sensitive information by blocking unauthorized attempts to intercept communications. Since only the pinned certificate can establish a connection, attackers using fake certificates are thwarted, which significantly reduces the risk of MITM attacks.
  • Enhanced Data Security for Sensitive Apps: Industries that handle sensitive information—like finance, healthcare, and government—benefit from certificate pinning because it provides an additional layer of security. For example, mobile banking apps can use certificate pinning to safeguard financial transactions, ensuring that only authorized servers can access the sensitive information being transmitted.

Types of Certificate Pinning

Public Key Pinning

Public key pinning associates a specific public key with the client application, which is then used to validate server connections. This approach is adaptable, allowing organizations to renew certificates without updating the pinning configuration, as long as the public key remains unchanged.

Certificate Hash Pinning

With certificate hash pinning, the client application pins the hash of a specific certificate. While it offers strong security by validating a precise certificate, it can be less flexible and requires updates to the application whenever a new certificate is issued.

Dynamic vs. Static Pinning

With static pinning, the certificate is pinned directly in the application code, which simplifies validation but may require an application update when the certificate changes. With dynamic pinning, the pin is fetched and updated dynamically, providing more flexibility. However, this method can be more complex to implement and requires additional monitoring.

Learn more about machine identity security, and how it can benefit your organization!

ALTRE VOCI DEL GLOSSARIO