Use dynamic pinning rather than hardcoded static pins wherever possible. That lets the trust set change without forcing an app update, while still preventing interception. The goal is to preserve channel integrity without creating self-inflicted outages when certificates rotate, expire or need to be revoked.
Why pinning and certificate rotation need to be designed together
Pinning is meant to narrow the trust relationship, but it becomes brittle when teams treat the pinned certificate as permanent. In mobile apps, certificate rotation is normal for expiry, revocation, incident response, and infrastructure changes, so the real design problem is to preserve trust without hard-wiring the app to a single certificate artifact.
Dynamic pinning is the practical answer because the app can learn or retrieve an approved trust set instead of depending on a fixed embedded pin. That gives security teams room to rotate certificates on schedule, recover from key compromise, and change issuing chains without forcing an emergency app release every time the certificate changes.
For mobile app testing and release planning, Mobile App Security Testing Guide is useful because it treats certificate pinning as part of runtime analysis, not just a build-time checkbox.
What breaks when pinning is static
Static pins create an availability dependency on one certificate, one public key, or one certificate chain. If the app still trusts only the old value after rotation, users can be locked out even though the server is healthy and the new certificate is valid. The failure is often self-inflicted: the security control is working exactly as coded, but the operational model did not account for change.
This is why teams should think in terms of trust continuity rather than certificate immutability. A good pinning strategy should tolerate planned rotation, support emergency replacement, and allow the trust decision to evolve when the issuing path or key material changes. Otherwise, the app's defensive control becomes a single point of failure for availability.
In practice, the most reliable rotation story combines pinning with an explicit trust update path, such as a remotely managed allowlist, overlapping trust windows, or a backup pin set. The goal is not to weaken verification, but to avoid forcing users into an outage because the app could not accept the next legitimate certificate.
How to choose a rotation-friendly trust model
The safest approach is to pin at the right layer. Teams should prefer pinning to a stable public key, intermediate, or trust anchor when that reduces churn, and they should avoid pinning a leaf certificate unless they have a tightly controlled renewal process. The more often the pinned artifact changes, the more likely the app will fail during normal certificate lifecycle events.
Machine Identity, PKI and Certificate Lifecycle Guide is the strongest internal reference for this problem because it frames certificate rotation as lifecycle management rather than a one-off patch event.
Use the certificate lifecycle to drive the pinning design, not the other way around. If your rotation cadence is short, your app needs a retrieval or update mechanism for the trusted set. If your trust model cannot support that, then the pinning scope is too rigid and should be redesigned before rollout.
For identity and lifecycle governance more broadly, Guide to NHI Rotation Challenges helps teams apply the same operational thinking to any credentialed trust material that must rotate safely.
Risk and Threat Considerations
Static pinning increases outage risk when certificates expire, are revoked, or are replaced after a security event. It can also slow incident response, because teams may hesitate to revoke a compromised certificate if they know the app cannot recover cleanly from the replacement path.
Failure mechanism: The app keeps trusting an obsolete pin after the server has moved to a legitimate new certificate or key, so the secure channel fails closed for real users even though the backend change was intended to improve security.
Impact: Users experience connection failure, support volume rises, and teams may delay revocation or rotation to avoid breaking the app. In worse cases, the pinning design forces an unsafe trade-off between keeping service available and keeping trust material current.
Dynamic pinning reduces that risk, but only if the update mechanism itself is protected. If an attacker can tamper with the trust-set delivery channel, they may be able to weaken or redirect the app's trust decision. The control therefore needs both rotation flexibility and strong integrity over the mechanism that distributes trust updates.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack surface, OWASP ASVS and NIST SP 800-53 Rev 5 set the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V12 — Secure Communication | Pinning and cert rotation directly affect TLS trust and channel integrity. |
| Recommendation — Validate certificate trust handling and rotation paths without breaking secure transport. | ||
| NIST SP 800-53 Rev 5 | SC-23 — Session Authenticity | Certificate pinning helps assure the authenticity of the secure channel endpoint. |
| SC-12 — Cryptographic Key Establishment and Management | Certificate rotation depends on managed cryptographic lifecycle and replacement. | |
| Recommendation — Authenticate secure channels so endpoint substitution is detected. Manage certificate and key lifecycle so rotation does not disrupt trusted connections. | ||
| ISO/IEC 27001:2022 | A.8.24 — Use of cryptography | Pinning and certificate rotation are cryptographic trust controls for mobile transport. |
| Recommendation — Control cryptographic trust material and its rotation through defined procedures. | ||
| OWASP Non-Human Identity Top 10 | NHI-07 — Long-Lived Secrets | Static pins and long-lived trust material create lifecycle and rotation risk. |
| Recommendation — Replace long-lived trust material with rotation-friendly credentials and trust updates. | ||
Practitioner Guidance
What to verify: Confirm whether the app pins leaf certs, public keys, or a broader trust bundle, and check which of those can change without an app store release. If the answer is "none," the pinning design is already too rigid for routine certificate rotation.
Decision rule: If certificate rotation is expected during the app's life cycle, use a design that allows overlapping trust values and a controlled update path. If you cannot support that safely, reduce the blast radius of pinning rather than relying on a brittle hardcoded pin.
What good looks like: A valid certificate replacement should be a normal operational event, not a mobile outage. Teams should be able to rotate keys, renew certificates, and revoke compromised material while the app continues to connect through an approved trust transition.
Practitioner takeaway: Treat pinning as a trust-boundary control, not as a substitute for certificate lifecycle management; the best design keeps interception resistance while making planned rotation boring.
Related resources from NHI Mgmt Group
- How should mobile security teams balance code hardening with app performance in high-volume fintech apps?
- How should security teams handle web traffic inspection when SaaS apps use certificate pinning?
- How should mobile teams balance code obfuscation with security testing in Android and iOS apps?
- How should security teams balance mobile app features with privacy risk in consumer-facing apps?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org