You can choose not to update in both Android and iOS. Same with running Windows.

Security bugfixes are tied to feature upgrades, unfortunately.