/

CVE-2026-114611

Severity:

CRITICAL RISK

(9.1)

Improper Certificate Validation (CWE-295) in OCO MDM

CVE-2026-114611

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

MDM Device Impersonation and Enrollment Hijacking

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OCO-Server improperly accepts Apple MDM enrollment requests signed with an unrelated or self-signed certificate because certificate-chain validation is disabled. An unauthenticated attacker who knows a registered device serial number may obtain MDM credentials for that device, hijack its record, and impersonate it in later management traffic.

OCO-Server improperly accepts Apple MDM enrollment requests signed with an unrelated or self-signed certificate because certificate-chain validation is disabled. An unauthenticated attacker who knows a registered device serial number may obtain MDM credentials for that device, hijack its record, and impersonate it in later management traffic.

Affected context

The vulnerability occurs in OCO-Server's Apple MDM enrollment workflow when the enrollment endpoint verifies a signed plist without validating the signer's certificate chain or trust relationship. Deployments are especially exposed when the endpoint is reachable by unauthenticated clients and device serial numbers can be obtained or guessed. Subsequent MDM endpoints rely on certificate-derived identity information, allowing credentials issued during the flawed enrollment process to affect an existing device record.

The vulnerability occurs in OCO-Server's Apple MDM enrollment workflow when the enrollment endpoint verifies a signed plist without validating the signer's certificate chain or trust relationship. Deployments are especially exposed when the endpoint is reachable by unauthenticated clients and device serial numbers can be obtained or guessed. Subsequent MDM endpoints rely on certificate-derived identity information, allowing credentials issued during the flawed enrollment process to affect an existing device record.

Exploit preconditions

  • Attack surface: The Apple MDM enrollment endpoint exposed through frontend/api-mdm.php
  • Required access: No authenticated account is required; the attacker needs a registered device's serial number or another way to identify it
  • Trigger point: Processing of a signed enrollment request at the MDM profile enrollment path
  • Why exploitation is possible: PKCS7_NOVERIFY permits self-consistent signatures without trusted signer validation, while the server accepts the payload's device identity and issues MDM credentials based on it
  • Resulting capability: The returned device certificate and private key can be used to present the victim device's identity to later MDM operations
  • Attack surface: The Apple MDM enrollment endpoint exposed through frontend/api-mdm.php
  • Required access: No authenticated account is required; the attacker needs a registered device's serial number or another way to identify it
  • Trigger point: Processing of a signed enrollment request at the MDM profile enrollment path
  • Why exploitation is possible: PKCS7_NOVERIFY permits self-consistent signatures without trusted signer validation, while the server accepts the payload's device identity and issues MDM credentials based on it
  • Resulting capability: The returned device certificate and private key can be used to present the victim device's identity to later MDM operations

Why this happens

The enrollment logic verifies the cryptographic integrity of a PKCS#7 object but disables certificate-chain and trust validation. This treats possession of any signing certificate as sufficient proof of device authority. The server also derives the target identity from an untrusted SERIAL value and issues a device certificate and private key before establishing that the requester is authorized to enroll that device. These behaviors map to CWE-295: Improper Certificate Validation, because certificate trust and signer identity are not validated before security-sensitive actions are performed.

The enrollment logic verifies the cryptographic integrity of a PKCS#7 object but disables certificate-chain and trust validation. This treats possession of any signing certificate as sufficient proof of device authority. The server also derives the target identity from an untrusted SERIAL value and issues a device certificate and private key before establishing that the requester is authorized to enroll that device. These behaviors map to CWE-295: Improper Certificate Validation, because certificate trust and signer identity are not validated before security-sensitive actions are performed.

Potential impact

  • An attacker may obtain MDM credentials associated with a registered device
  • The device record may be overwritten with attacker-controlled enrollment information
  • The attacker could impersonate the victim device in subsequent MDM requests
  • Management data may be read, altered, redirected, or disrupted
  • Push-notification configuration and enrollment state could be replaced
  • Device administration workflows may be disrupted or used for unauthorized management actions
  • An attacker may obtain MDM credentials associated with a registered device
  • The device record may be overwritten with attacker-controlled enrollment information
  • The attacker could impersonate the victim device in subsequent MDM requests
  • Management data may be read, altered, redirected, or disrupted
  • Push-notification configuration and enrollment state could be replaced
  • Device administration workflows may be disrupted or used for unauthorized management actions

General mitigation guidance

Mitigation should focus on establishing a trusted device-enrollment boundary before issuing credentials.

Common defensive patterns include:

  • Require certificate-chain validation against an explicitly configured, trusted Apple MDM enrollment authority
  • Reject self-signed or otherwise untrusted signer certificates unless they are deliberately provisioned and independently authenticated
  • Bind enrollment authorization to a server-issued, single-use challenge rather than trusting a submitted serial number
  • Validate device identity, enrollment state, and ownership through an independent control plane before modifying records
  • Do not issue private keys or device certificates until all authorization checks succeed
  • Prevent unauthenticated requests from overwriting existing device records
  • Separate device identity from user-controlled certificate subject fields and apply least-privilege authorization to MDM operations
  • Rotate or revoke potentially exposed device credentials and review affected enrollment records

Mitigation should focus on establishing a trusted device-enrollment boundary before issuing credentials.

Common defensive patterns include:

  • Require certificate-chain validation against an explicitly configured, trusted Apple MDM enrollment authority
  • Reject self-signed or otherwise untrusted signer certificates unless they are deliberately provisioned and independently authenticated
  • Bind enrollment authorization to a server-issued, single-use challenge rather than trusting a submitted serial number
  • Validate device identity, enrollment state, and ownership through an independent control plane before modifying records
  • Do not issue private keys or device certificates until all authorization checks succeed
  • Prevent unauthenticated requests from overwriting existing device records
  • Separate device identity from user-controlled certificate subject fields and apply least-privilege authorization to MDM operations
  • Rotate or revoke potentially exposed device credentials and review affected enrollment records

How teams detect issues like this

Detection and review can include:

  • Static analysis and code review checks for PKCS7_NOVERIFY, disabled trust verification, or certificate checks that validate signatures without validating chains
  • Searches for MDM enrollment paths that accept identity fields directly from signed-but-untrusted input
  • Audit logging of enrollment requests, certificate issuance, device-record changes, and subsequent MDM authentication
  • Alerts for enrollment activity that lacks a preceding authenticated authorization event or challenge
  • Monitoring for certificate subjects, serial numbers, UDIDs, and device records changing unexpectedly
  • Policy enforcement requiring trusted certificate authorities and explicit authorization before provisioning device credentials
  • Automated security review tools can help identify disabled verification flags and unsafe certificate-validation patterns

Detection and review can include:

  • Static analysis and code review checks for PKCS7_NOVERIFY, disabled trust verification, or certificate checks that validate signatures without validating chains
  • Searches for MDM enrollment paths that accept identity fields directly from signed-but-untrusted input
  • Audit logging of enrollment requests, certificate issuance, device-record changes, and subsequent MDM authentication
  • Alerts for enrollment activity that lacks a preceding authenticated authorization event or challenge
  • Monitoring for certificate subjects, serial numbers, UDIDs, and device records changing unexpectedly
  • Policy enforcement requiring trusted certificate authorities and explicit authorization before provisioning device credentials
  • Automated security review tools can help identify disabled verification flags and unsafe certificate-validation patterns

Sources

SourceLink
github.comgithub.com/schorschii/OCO-Server/commit/5cab5ad2461434816d706b7be9cc08bda15c1404
github.comgithub.com/schorschii/OCO-Server/commit/f3a6591136f9bd92aff39ddfb26587e6dfdb64df
github.comgithub.com/schorschii/OCO-Server/security/advisories/GHSA-p549-5h7r-7639

Frequently asked

questions

Yes. When the MDM enrollment endpoint is network-reachable, exploitation can occur remotely without an authenticated OCO-Server account, subject to the attacker knowing or discovering a registered device serial number.

No direct access to the device is required. The critical requirements are access to the enrollment endpoint and a target device identifier accepted by the server.

Validate the complete certificate chain against an explicitly trusted enrollment authority, independently authorize the device enrollment, and avoid issuing or replacing credentials based only on submitted identity fields.

Treat certificate possession and signed payloads as insufficient by themselves, use server-issued enrollment challenges, protect device-record updates, log identity changes, and regularly review certificate issuance and MDM authentication events.

Yes. When the MDM enrollment endpoint is network-reachable, exploitation can occur remotely without an authenticated OCO-Server account, subject to the attacker knowing or discovering a registered device serial number.

No direct access to the device is required. The critical requirements are access to the enrollment endpoint and a target device identifier accepted by the server.

Validate the complete certificate chain against an explicitly trusted enrollment authority, independently authorize the device enrollment, and avoid issuing or replacing credentials based only on submitted identity fields.

Treat certificate possession and signed payloads as insufficient by themselves, use server-issued enrollment challenges, protect device-record updates, log identity changes, and regularly review certificate issuance and MDM authentication events.

Find out what's already
exploitable in your codebase.