CVE-2026-112652 - iOS 27.0.1 SecPolicyCreateWithProperties certificate-validation bypass: root-cause analysis, differential PoC harness, and build tooling
Security.frameworkA root-cause analysis of the iOS 27.0.1 → 27.2 certificate-validation fix, with a differentially verified proof and a reproducible harness.
| CVE | CVE-2026-112652 |
| CWE | CWE-295 — Improper Certificate Validation |
| CVSS 3.1 | 5.5 MEDIUM — AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| Component (Apple) | Security |
| Component (actual) | Security.framework (userspace) → SecPolicyCreateWithProperties |
| Affected policy class | 1.2.840.113635.100.1.62 — the Apple pinned policy (SecPolicyCreateApplePinned) |
| Fixed in | iOS 27.2 · iPadOS 27.2 · macOS 15.8.2 / 26.7.2 / Golden Gate 27.2 · visionOS 27.2 |
| Advisory | HT149230 |
| Reporter | Aditya Kumar |
| CISA KEV | not listed · no known exploitation |
Nothing in this repository is a pre-built artefact. Every binary, certificate and firmware image is generated locally by
make. See Building.
SecPolicyCreateWithProperties() builds a SecPolicy from a caller-supplied
property dictionary. On iOS 27.0.1 it verified only one of the inputs a policy
needs. Omit kSecPolicyPolicyName and/or kSecPolicyLeafMarkerOid and it still
returned a non-NULL policy — one missing the constraints the caller asked
for — instead of refusing. iOS 27.2 added the two missing presence checks, a
dedicated kSecPolicyErrorMissingProperties error, and a new
SecPolicyCreateWithPropertiesWithError API that reports the failure.
Apple's own description is "A logic issue was addressed with improved state management": the policy object was carried into trust evaluation partially initialised instead of being rejected at creation.
iOS 27.0.1 — the dispatch branch for the pinning class checks three values,
and none of them is kSecPolicyPolicyName or kSecPolicyLeafMarkerOid:
0x187f11f8c: add x1, x1, #0x640 ; OID 1.2.840.113635.100.1.63
0x187f11f94: bl 0x188140ec0 ; CFEqual(policyIdentifier, OID)
0x187f11f98: cbz w0, loc_187f12000 ; not this class -> next
0x187f11f9c: cbz x19, loc_187f12040 ; SecPolicyPolicyName missing
0x187f11fa0: ldr x1, [sp, #0x18] ; value of SecPolicyName
0x187f11fa4: cbz x1, loc_187f12040 ; SecPolicyName missing
0x187f11fa8: cbz x25, loc_187f12040 ; SecPolicyLeafMarkerOid missing
0x187f11fb8: bl _SecPolicyCreateAppleSSLPinned
iOS 27.2 — same branch, two presence checks added:
0x187e88318: ldr x8, [sp, #0x10] ; SecPolicyPolicyName value
0x187e8831c: cbz x8, loc_187e88440 ; MISSING -> error <-- ADDED
0x187e88320: cbz x22, loc_187e88440 ; SecPolicyIntermediateMarkerOid MISSING <-- ADDED
0x187e88324: cbz x24, loc_187e88440 ; SecPolicyLeafMarkerOid MISSING <-- ADDED
0x187e88334: bl _SecPolicyCreateApplePinned
Both new failures funnel into the new helper, which returns errSecParam and
NULL:
0x187e884c4: bl _SecPolicyErrorMissingProperties
...
0x187e87d18: mov w0, #0xffffffce ; errSecParam = -50
0x187e87d20: bl _SecError
0x187e87d24: mov x22, #0 ; return NULL
And the public API was re-pointed at the new implementation:
_SecPolicyCreateWithProperties:
0x187e8feb0: mov x2, #0 ; CFErrorRef *out = NULL
0x187e8feb4: b _SecPolicyCreateWithPropertiesWithError
The harness sweeps 123 policy identifiers × 5 property subsets = 618 cases, run on a vulnerable iPhone 18 Pro Max and compared against a fixed macOS:
| iOS 27.0.1 (vulnerable) | macOS 26.7.2 (fixed) | |
|---|---|---|
CONTROL anchored-basic-x509 | ACCEPT | ACCEPT — harness verified |
policy=OK | 579 | 555 |
policy=NULL | 39 | 63 |
| classes implemented by both | 347 | 347 |
The fix touches three policy classes —
1.2.840.113635.100.1.62(Apple pinned),.68(IDS) and.47(Apple Server Authentication) — and on the vulnerable build two of them accept the under-specified dictionaries:.47 (Apple Server Auth): full=OK no-leafmarker=OK no-policyname=OK name-only=OK .68 (IDS): full=OK no-leafmarker=OK no-policyname=OK name-only=OKmacOS 26.7.2 returns the same values, which proves its implementation of those branches differs from iOS 27.2's — so macOS is the wrong reference for exactly the classes the fix touches. The remaining 24 differing rows are in five classes macOS does not implement at all.
Prediction: on iOS 27.2 those six rows flip to
policy=NULL. That is the decisive measurement, and it needs an iPhone on 27.2 — seedocs/FINDINGS.md§3.
The fix is located statically and exactly: on the 1.2.840.113635.100.1.62
(Apple pinned) branch, 27.2 requires kSecPolicyPolicyName,
kSecPolicyIntermediateMarkerOid and kSecPolicyLeafMarkerOid, and
returns errSecParam + kSecPolicyErrorMissingProperties instead of a bare
NULL.
Full analysis in docs/IMPACT.md. The short version:
It is not a device compromise. Reachability, resolved from the dyld shared cache symbol tables:
SecPolicyCreateWithProperties is imported by CFNetwork, Accounts,
StoreServices and CloudServices only.1.2.840.113635.100.1.62 appears in exactly one
image in the whole cache: Security. No system component asks for it.So no privilege boundary is crossed. An app that wants to trust a hostile
certificate does not need this bug — SecPolicyCreateBasicX509() plus
SecTrustSetAnchorCertificates() already does that. The realistic harm is a
silent loss of a developer's intended pinning constraint: the API succeeds,
and the developer has no way to notice.
It is not related to TrollStore. TrollStore's core bugs are entitlement and
code-signature validation in installd / amfid
(CVE-2022-26766, CVE-2022-29967). This is trust-policy construction in
Security.framework. Same CWE class, different binary, different privilege
boundary, different consequence. There is no path from a caller-controlled trust
policy to a signature or entitlement decision.
What it is worth as research: a genuine Apple-assigned CWE-295 with a root
cause proven to the instruction level, verified differentially on real hardware,
plus a reusable toolkit. The higher-value work is hunting a bypass of the
27.2 fix — the only route to a new, unfixed CVE — and auditing CFNetwork's call
site. See docs/IMPACT.md §5.
docs/
ROOT_CAUSE.md the proof: disassembly, string resolution, the exact defect
FINDINGS.md the measured differential and the attack chain
IMPACT.md reachability, attacker gain, the TrollStore question
METHODOLOGY.md how every conclusion was reached, and the pitfalls
EVIDENCE.md how to read the captured reports
RESEARCH-PLAN.md the A-Z plan this work followed