
How to disable USB ports or block USB storage on Windows, Mac and Linux: Group Policy, registry, MDM, BIOS and USBGuard, with keyboards still working.
What USB Restricted Mode does on iPhone and iPad, how to turn the accessories setting on or off, whether it affects charging, and what it means for IT.


Content writer, trio.so
USB Restricted Mode is the iPhone and iPad protection that stops a wired accessory from exchanging data with a locked device until you unlock it. Apple added it in iOS 11.4.1. A locked device can still charge from a power adapter, but a computer, forensic tool or other wired accessory gets no data connection until the passcode, Face ID or Touch ID is used. In iOS 26 you control it in Settings > Privacy & Security > Wired Accessories. Older versions put it under Face ID & Passcode as the Accessories switch.
If your iPhone just asked you to unlock it to use an accessory, the steps to change that are in the enable and disable section below; the rest of the guide is for anyone deciding whether to change it.
USB Restricted Mode is a security feature introduced in iOS 11.4.1 that blocks data access through the Lightning or USB-C port while the device is locked. The device still charges, but the accessory cannot exchange data until someone unlocks the device.
The feature targets a specific window. Forensic tools used by law enforcement and attackers connect over USB to try passcodes or pull data from a locked iPhone. If the port stops talking to accessories once the phone has been locked, those tools have nothing to connect to.
It works alongside the rest of the device. Charging, Face ID and Touch ID behave as usual, and accessories you connected while the device was unlocked stay connected after it locks again.
In the versions most people know, the rule was time based: if the iPhone had been locked for more than an hour, a wired accessory could not exchange data until the device was unlocked. Apple's current support article describes the choice in terms of when accessories are allowed. Once you unlock the device, Apple says the accessory "remains connected, even if your device is locked again."
The charging circuit is not part of the restriction. If you don't unlock the device, Apple notes it "won't communicate with the accessory and it might not charge" from that accessory, but it still charges normally from a USB power adapter.
On iOS 26 the setting has more choices on models with USB-C:
Lightning models offer only Automatically Allow When Unlocked and Always Allow. Source: Apple Support, Allow USB and other accessories to connect to your iPhone or iPad.
Apple added USB Restricted Mode in 2018 to counter forensic extraction tools that connect over the port of a locked iPhone. Products from companies such as Cellebrite and Grayshift worked through the Lightning port, and public cases about access to locked iPhones made the gap visible.
The protection also covers simpler threats. Someone with brief physical access can try to copy data or plant something through a cable. And a public charging station or cable with hidden electronics, the "juice jacking" scenario, cannot read data from a device that refuses to talk to it while locked.
The protection is on by default. Where you change it depends on your iOS version.
Most security guidance says to keep the default. Allowing accessories while locked reopens the window the feature closes. If you use a wired accessory all day, such as CarPlay over a cable or a medical device, unlocking the phone once after you plug in is usually enough, because the accessory stays connected after the phone locks again.
For company devices, administrators can control this setting on supervised iPhones and iPads with Apple Configurator or mobile device management, so the choice is the same on every device. Devices bought through Apple Business Manager can be supervised when they are set up.
In February 2025 Apple released iOS 18.3.1 and iPadOS 18.3.1 to fix CVE-2025-24200, a flaw that let someone with physical access disable USB Restricted Mode on a locked device. Apple said the issue may have been exploited in "an extremely sophisticated attack against specific targeted individuals."
Security researchers at Quarkslab traced the flaw to the accessibility framework: with an accessibility accessory and Switch Control, the lock screen offered a prompt that could switch the restriction off. Apple fixed it with improved state management. The update covers iPhone XS and later and the supported iPad models.
The lesson for anyone managing Apple devices is simple: install security updates quickly. Disk encryption, which every iPhone has when a passcode is set, and FileVault on the Mac, keeps data protected even if one control fails.
USB Restricted Mode protects one thing: data access through the port while the device is locked. It does not stop theft, someone reading an unlocked screen, or attacks over Wi-Fi, Bluetooth or the network.
Supervised devices can have the protection relaxed by MDM. Some organizations do this so accessories such as scanners or card readers keep working, which trades security for convenience. Decide it on purpose and write down why.
Accessories that need a data connection while the device stays locked, such as some car systems, medical devices or specialized equipment, may not work until the device is unlocked. Unlocking once after connecting usually solves it.
Charging still works from a power adapter, so the restriction does not cover every possible attack through power delivery, although such attacks are far harder than data-based ones. Strong passcodes, two-factor authentication and prompt updates still matter.
For companies and high-risk individuals, USB Restricted Mode is one control in a wider setup, not a strategy on its own. It is strongest when the default stays in place.
Healthcare, finance and government teams that handle sensitive data should keep the default on company iPhones and iPads, set it the same way on every supervised device, and combine it with a passcode policy, quick iOS updates and the ability to lock or wipe a lost device.
Executives, journalists and activists who may be targeted by well-funded attackers should keep the strictest option their device offers. On iOS 26 with USB-C, that is Always Ask or Ask for New Accessories. Apple's Lockdown Mode adds further protection for this group.
Remote workers carry devices through hotels, airports and public spaces, where a borrowed charger or a stranger's cable is the most likely way in. Review the setting on supervised devices whenever you change your MDM configuration.
| Feature or aspect | Details |
|---|---|
| What it blocks | Data from a wired accessory while the device is locked. Charging from a power adapter still works. |
| Where to set it (iOS 26) | Settings > Privacy & Security > Wired Accessories |
| Where to set it (iOS 18 and earlier) | Settings > Face ID & Passcode > Accessories, under Allow Access When Locked |
| Default | Automatically Allow When Unlocked |
| Turning it off | Always Allow (iOS 26) or the Accessories switch on (earlier versions) |
| Security benefit | Protects against forensic extraction tools and data theft through cables or chargers |
| Recent vulnerability | CVE-2025-24200, fixed in iOS 18.3.1 and iPadOS 18.3.1 |
| Company control | Supervised devices, through Apple Configurator or MDM |
USB Restricted Mode closes a real gap: the port of a locked iPhone or iPad. It has had one serious bypass, which Apple has fixed, and it remains an important part of iOS security.
Keep the default unless an accessory you depend on truly needs more, and on company devices set the choice once through supervision so it is the same everywhere. Pair it with prompt updates, a strong passcode and the ability to lock or wipe a lost device.
Related reading: remote lock an iPhone, how to remote wipe an iPhone and Apple Business Manager.
trio.so brings device management, patching and security policies for Windows, macOS, Linux, iOS/iPadOS and Android into one console. Enroll a device and see it in the console within minutes.
trio.so brings device management, patching and security policies for Windows, macOS, Linux, iOS/iPadOS and Android into one console. Enroll a device and see it in the console within minutes.





Related
The related industry news, interviews, technologies, and resources.

How to disable USB ports or block USB storage on Windows, Mac and Linux: Group Policy, registry, MDM, BIOS and USBGuard, with keyboards still working.

BitLocker vs VeraCrypt: Which is best for enterprise encryption? Compare features, security, and management to choose the right fit.

What BitLocker drive encryption is, how TPM, PIN and recovery keys work, Windows 11 Home vs Pro, and how IT turns it on and keeps keys safe at scale.

What endpoint hardening is, a checklist by area for Windows and Mac, CIS Benchmarks as a baseline, and how to apply and check hardening across a fleet.

EDR vs MDM: what each one does, where they overlap, why most teams run both, and how they share data to find and fix risky devices faster.

How MDM manages certificates on iPhone and iPad: the APNs push certificate, SCEP and PKCS identity certificates, trusted roots, renewal and revocation.

What unauthorized access to a computer system is, the seven ways attackers get in, how to spot it, and a checklist to prevent it on devices and accounts.

What defense in depth means, the five layers from perimeter to people, how it differs from layered security, and how to apply it in a small IT team.
14-day free trial. No credit card required.
trio.so for MSPs: one console, separate clients