DEV Community

johnettwawers
johnettwawers

Posted on

A First-Admin Race Needs a Database Constraint, Not a Retry

A First-Admin Race Needs a Database Constraint, Not a Retry

The first administrator account is a special setup condition. OpenPLC Runtime CVE-2026-126088 shows what happens when two requests can both believe that condition still exists.

The issue

CISA advisory ICSA-26-323-01 covers Autonomy Logic OpenPLC Runtime versions 4.2.4 and prior. CVE-2026-126088 is a race condition in which concurrent requests pass the user existence check before any account is committed. The result can be several unauthenticated administrator accounts. CISA lists CVSS 3.1 score 8.1 and CVSS 4.0 score 9.2. The vendor fix is OpenPLC Runtime 4.3.0 or later.

Check then act

The vulnerable pattern is a check followed by a separate write. If two requests both observe that no administrator exists, both can continue to create one. An application lock in one process may not protect multiple workers, containers, or service instances. The durable boundary is a database uniqueness rule and a transaction that serializes the first-admin decision.

Industrial context

OpenPLC Runtime is used across manufacturing, energy, transportation, and water systems. A new administrator account can change program, configuration, or operational authority. The advisory does not report public exploitation of this CVE. That gap should shape the incident language, not the urgency of inventory and patching.

Remediation

Upgrade to OpenPLC Runtime 4.3.0 or later. Close the initial setup path after commissioning and require an existing administrative action to create another administrator. If custom code controls account creation, add a database unique constraint for the first-admin invariant and test concurrent requests against it. Restrict the runtime interface to the control network and review account creation logs.

Verification

List every administrator account and compare its creation time with approved commissioning records. Remove unknown accounts after preserving evidence. Test account creation from two simultaneous clients in a non-production environment and confirm that exactly one request succeeds. Do not describe a race as harmless because it is difficult to reproduce; the invariant must hold under concurrency.

References

Top comments (0)