Mobile application security

Mobile certificate pinning design and lifecycle risks

Mobile certificate pinning design and: phone, signature, key arranged to illustrate mobile certificate pinning design and lifecycle risks.

Pinning can reduce particular trust risks but introduces operational dependencies around certificate changes. Understanding mobile certificate pinning design and lifecycle risks helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Cryptographic protection depends on the whole operation: the algorithm, its parameters, key handling and the way results are verified. Different mechanisms provide confidentiality, integrity or evidence of origin. Substituting one property for another can leave the important business requirement unprotected.

If another certificate pinning implementation is identified for the same domains, such as a custom TrustManager or a third-party library, the result should be treated as not covered by NSC pinning rather than as a confirmed absence of certificate pinning.

Determining which domains are first-party and security-relevant typically requires information that is not present in the app binary and may require contact with the developers.

Why it matters

Consider a realistic failure: a pin expires and an emergency workaround disables certificate checks for all users.

A weakness can undermine trust in stored records or messages even when their appearance does not change. Assessment should connect the defect to the data or action it protects and the capabilities available to an attacker.

Mobile behaviour can change between a fresh installation, an authenticated session, background activity and a device migration. The assessment needs the actual release and representative supported device states.

How penetration testers check for it

Review threat justification, pin scope, expiry, backup strategy and failure behaviour.

  • Identify the security purpose of each cryptographic operation.
  • Review algorithms, parameters and maintained library use.
  • Trace key generation, access, replacement and verification.
  • Test invalid inputs and failure handling with controlled data.

How to fix it

Use correctly scoped pins where appropriate and maintain a safe certificate change plan.

  • Use maintained standard implementations and appropriate parameters.
  • Protect keys throughout generation, use and retirement.
  • Authenticate the content and identity that the operation actually relies on.
  • Reject failed verification before trusting or processing the result.

An unusual cryptographic implementation is not enough to establish practical compromise. The report should explain the failed property and a defensible consequence.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss your mobile applications.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo