Mobile over-the-air (OTA) updates let a React Native or Expo app download a new JavaScript bundle and assets straight from an update server, skipping app store review, so whoever controls the publishing credentials and the update channel controls the code running on every user's device. That speed is the point of OTA, and it is also why the update pipeline deserves the same protection as a release signing key.
This guide covers the threat model for mobile OTA updates, the store policy boundaries, code signing, the publishing credentials that act as non-human identities, and the change left by the retirement of Microsoft's hosted CodePush service. It does not cover operating system patching on managed devices, which is in the Mobile OS Update Management Guide, or desktop updaters, which are in the Desktop Application Auto-Update Security Guide.
Key takeaways
- An OTA update is unreviewed code delivered to production devices. Treat the ability to publish one as equivalent to the ability to ship a new app version.
- Store policies allow OTA delivery of interpreted code within limits. Apple's guideline 2.5.2 forbids downloading code that "introduces or changes features or functionality of the app", and Google Play forbids self-updating outside its update mechanism, with an exception for interpreted code.
- Expo EAS Update offers end-to-end code signing, but it is an opt-in feature you configure yourself, and it is "only available to accounts subscribed to the Production or Enterprise plans".
- Microsoft retired Visual Studio App Center, including hosted CodePush, on 31 March 2025. The standalone CodePush server is archived and provided "as is" without Microsoft support, so teams running it own its security entirely.
- Publishing tokens, signing private keys and CI credentials for update channels are high-value non-human identities. Keep them out of source control, scope them narrowly and rotate them.
The OTA threat model
A native app binary passes through store review and is signed with a key the platform verifies. An OTA update replaces the JavaScript bundle that the binary loads, and on most setups that bundle is verified only by whatever the update client checks. The questions that matter are:
| Threat | What the attacker needs | Primary control |
|---|---|---|
| Malicious update published through the legitimate channel | A publishing token, a developer account session or a compromised CI job | Least-privilege publishing identities, protected CI environments, code signing with a key held outside CI |
| Update tampered with in transit or at the CDN | Control of a network path, CDN or storage bucket | Client-side signature verification against an embedded certificate |
| Update server compromise | Access to the update service or self-hosted server | Code signing (so the server cannot forge updates), server hardening, monitoring |
| Rollback to an older vulnerable bundle | Ability to republish or point a channel at an old update | Release controls, audit of channel changes, runtime version discipline |
| Policy breach leading to store removal | A team that ships new features over the air | Release policy aligned with store rules |
The pattern mirrors desktop auto-update risk: the update mechanism is a code execution channel with the reach of your entire install base. Supply chain attacks that hijack a legitimate distribution path are catalogued by MITRE ATT&CK as T1195.002 Compromise Software Supply Chain.
Store policy boundaries
OTA is permitted because both stores carve out interpreted code, but neither store treats OTA as a way around review for new functionality. Teams should write a release policy that says which changes may ship over the air.
Apple App Store
Guideline 2.5.2 says apps "may not download, install, or execute code which introduces or changes features or functionality of the app, including other apps". Guideline 4.7 permits certain software not embedded in the binary, such as HTML5 and JavaScript mini apps, and states that "You are responsible for all such software offered in your app".
Google Play
Google Play's Device and Network Abuse policy states that an app "may not modify, replace, or update itself using any method other than Google Play's update mechanism" and may not download executable code such as dex, JAR or .so files from outside Google Play. The restriction does not apply to code that runs in a virtual machine or interpreter that provides indirect access to Android APIs, such as JavaScript in a webview or browser.
What this means for a release policy
A practical reading, and an NHI Mgmt Group recommendation rather than store guidance, is to reserve OTA for bug fixes, copy and content changes, and small behavioural fixes within existing features. Anything that adds a feature, requests a new permission, changes data collection or alters payment flows should ship as a reviewed store build. Native code changes cannot ship over the air at all; they require a new binary and, in Expo terms, a new runtime version.
Platform notes: CodePush successors and Expo EAS Update
The two options below are listed alphabetically. Each section describes that option's own documented behaviour; this guide does not rank them.
CodePush standalone server
Microsoft states that "Visual Studio App Center is scheduled for retirement on March 31, 2025" and that after that date it is not possible to sign in or make API calls. For CodePush, Microsoft prepared "a special version of CodePush that can be integrated into your app and run independently from App Center", published in the microsoft/code-push-server repository.
The repository README describes a server and a command-line tool that work with the CodePush React Native client SDK. It states that the code is provided "as is" and that Microsoft will not provide support services for it. The repository is archived and not accepting contributions or issues, and it is MIT licensed, so organisations can fork it.
For security teams, this changes ownership. A self-hosted or forked CodePush server is now your application, with your patching, your authentication, your storage and your logging. Specific controls:
- Inventory every app still configured against App Center endpoints; since the hosted service was retired, those apps can no longer receive updates through it.
- If you run the standalone server, assign an owner, track dependencies in the fork, and include it in vulnerability management and penetration testing.
- Put the server's admin interface and API behind your identity provider, and issue CLI access keys per person or per pipeline rather than shared keys.
- Confirm whether the client SDK version and server fork you use support signature verification of bundles, and enable it if they do. If not, treat transport security and storage access control as the only integrity controls and record that as a risk.
- If you use a commercial or community CodePush-compatible service, review its documentation for signing, access control and audit logging before migrating.
Expo EAS Update
EAS Update code signing uses public-key cryptography so that the client verifies each update before applying it. Expo states that with code signing, intermediaries such as an ISP, CDN, cloud provider or Expo itself "cannot tamper with updates run by apps". The feature requires a Production or Enterprise plan.
The documented setup is:
- Generate a key pair and certificate with
npx expo-updates codesigning:generate, which writesprivate-key.pem,public-key.pemandcertificate.pem. - Store the private key outside source control, for example in a KMS or password manager. The certificate is checked in.
- Run
npx expo-updates codesigning:configure, which setsupdates.codeSigningCertificateandupdates.codeSigningMetadata(akeyidand thersa-v1_5-sha256algorithm) inapp.json. Without Continuous Native Generation, the same values go intoAndroidManifest.xmlandExpo.plist. - Ship a new native build with a new runtime version, because the certificate is embedded in the binary.
- Publish with
eas update --private-key-path. The CLI signs locally, so the private key is not uploaded; only the signature travels with the update.
On the device, the library checks the downloaded update against the embedded certificate and signature, and applies it only if both are valid. Expo documents key rotation for certificate expiry, private key compromise or routine practice: back up the old keys, generate a new pair, optionally change the keyid, set a new runtime version for new builds and publish updates signed with the new key. An expired certificate stops new updates from applying, while updates already downloaded keep working, so track the expiry date set by --certificate-validity-duration-years.
Expo also documents removing code signing as rotating to a null key with a new runtime version, after which only unsigned updates run in the new build. Make removal a change that needs security approval.
Code signing design for OTA
Whatever the platform, the signing design decides whether a stolen publishing token is enough to ship malicious code. Recommendations:
- Separate the signing key from the publishing token. If CI holds both, one CI compromise is enough. Hold the signing key in a KMS or HSM and have a release step, with approval, request a signature.
- Use one key per app and environment. A staging key should never produce signatures that production builds accept.
- Plan rotation before you need it. Because the certificate ships in the binary, rotation requires a store build. Keep a documented procedure and rehearse it, so a key compromise does not leave you choosing between unsigned updates and no updates.
- Record key custody. List who and what can use each signing key, as you would for any code signing certificate. The Code Signing Security Guide covers custody and audit in depth.
Publishing credentials as non-human identities
The identities that can publish updates are usually not people. They are CI service accounts, access tokens for the update service, CLI keys for a self-hosted server and the cloud credentials for any bucket or CDN that serves bundles. Each should be treated as a privileged non-human identity:
- Inventory. List every token and account that can publish to, or change the target of, a production channel or branch.
- Scope. Use separate tokens per app and environment, with publish rights only where needed. Developers should not hold production publish tokens on laptops.
- Protect in CI. Store tokens as environment-scoped secrets behind protected environments and required reviewers. If your CI supports OIDC federation to your cloud, use it for storage access instead of static keys.
- Keep secrets out of bundles. JavaScript bundles are readable by anyone with the app. Never embed API keys with meaningful privilege in the bundle; see Secrets in mobile apps.
- Rotate and revoke. Rotate publishing tokens on a schedule and on staff or vendor change, and revoke tokens for retired pipelines.
Release controls and rollback
- Require approval for production channels. Gate the publish step behind the same approval as a store release, with a named approver.
- Stage rollouts. Where the platform supports percentage rollouts or separate channels, publish to internal testers first, then a small share of users, and watch crash and error telemetry before widening.
- Keep runtime versions strict. Runtime versions bind JavaScript updates to compatible native builds. Loose policies risk shipping a bundle to a binary it was not built for, and make rollback behaviour harder to predict.
- Audit channel changes. Repointing a channel to an older update is a release event. Log it, alert on it and review it.
- Have a kill switch. Know how to stop updates reaching devices quickly, and test it.
Detection and measurement
- Alert on any production publish outside the CI pipeline, or from an unexpected account or location.
- Reconcile every published update against a tagged commit and a pipeline run. An update without a matching build record is an incident until explained.
- Track signing coverage: the share of production apps and builds that verify signatures.
- Track certificate expiry dates and publishing token age.
- Monitor app telemetry for unexpected bundle identifiers or update IDs.
Testing should include OTA in scope. The Mobile App Security Testing Guide and the OWASP Mobile Application Security Verification Standard cover code integrity and tampering checks that apply to downloaded bundles as well as the binary.
Responding to a malicious or unauthorised update
- Stop distribution: republish the last known good update to affected channels or use your kill switch.
- Revoke and rotate every publishing token and account that could have published it, and rotate the signing key if there is any chance it was used.
- Establish what the update did: diff the bundle against the last known good build and check network destinations it introduced.
- If the signing key was compromised, ship a store build with a new certificate and runtime version, and plan how to move users onto it.
- Assess store policy and data protection notification duties with legal and privacy teams.
Common failure patterns
- Leaving code signing off because it is opt-in, so the update server and CDN are trusted implicitly.
- Holding the signing private key as a CI secret next to the publishing token.
- Committing the private key to the repository alongside the certificate.
- Sharing one publishing token across apps, environments and developers.
- Apps still configured for hosted CodePush after retirement, silently receiving no fixes.
- Running the archived CodePush server without an owner, patching or authentication review.
- Shipping new features over the air and risking store enforcement.
- No procedure for certificate expiry, so updates stop applying on a date nobody tracked.
Practitioner checklist
- Inventory every mobile app that loads OTA updates and record its update service, channels and runtime versions.
- Enable code signing for every production app where the platform supports it, and record exceptions as risks.
- Store signing private keys in a KMS, HSM or vault, separate from CI publishing tokens.
- Scope publishing tokens per app and environment, keep them behind protected CI environments and rotate them.
- Migrate or assign an owner for any app tied to hosted App Center CodePush or the standalone server.
- Write an OTA release policy aligned with Apple guideline 2.5.2 and Google Play's Device and Network Abuse policy.
- Require approval and staged rollout for production OTA publishes, and log channel changes.
- Track certificate expiry and rehearse key rotation with a new runtime version.
- Reconcile published updates against build records and alert on mismatches.
Standards and references
- Expo Docs: EAS Update code signing
- Microsoft Learn: Visual Studio App Center retirement
- Microsoft: code-push-server README
- Apple: App Store Review Guidelines
- Google Play: Device and Network Abuse policy
- OWASP: Mobile Application Security Verification Standard
- MITRE ATT&CK: T1195.002 Compromise Software Supply Chain
- NIST: SP 800-218 Secure Software Development Framework (SSDF) Version 1.1
Related NHI Mgmt Group resources: Desktop Application Auto-Update Security Guide · Mobile App Security Guide · Code Signing Security Guide · Secrets in mobile apps