← Lab /AI/ML

COBALT finds arithmetic bugs in four production codebases pre-deployment

COBALT can identify CWE-190/191/195 patterns in C/C++ infrastructure and would have caught the Mythos escape vector

AI/ML arXiv 22 Apr 2026 Method Prototype evidence Threat model

Published as “Mythos and the Unverified Cage: Z3-Based Pre-Deployment Verification for Frontier-Model Sandbox Infrastructure”

Why it matters

Pre-deployment formal verification can eliminate a whole class of arithmetic overflow vulnerabilities before frontier models are deployed, removing a key failure mode exposed by the Mythos incident.

Summary

COBALT detects arithmetic vulnerability patterns in production codebases, producing SAT verdicts with concrete witnesses and UNSAT guarantees under explicit safety bounds. The tool is validated on four real-world C/C++ infrastructure projects (NASA cFE, wolfSSL, Eclipse Mosquitto, NASA F Prime), each yielding reproducible Z3 encodings and disclosed findings. The evidence is strong in that the authors provide full source listings, solver output, and responsible disclosure outcomes, but the paper does not quantify false-positive rates or coverage beyond the four CWE classes.

What they found 2

  1. COBALT can automatically detect arithmetic vulnerability patterns and provide formal witnesses or proofs.

    “COBALT detects arithmetic vulnerability patterns in production codebases, producing SAT verdicts with concrete witnesses and UNSAT guarantees under explicit safety bounds.”

  2. In NASA cFE, COBALT found a truncation bug where 64-bit resource IDs are silently reduced to 32-bit values on embedded targets.

    “Verdict. SAT. Any resource ID with non-zero upper 32 bits is silently truncated to zero on 32-bit embedded targets, creating ID aliasing and potential privilege confusion between missions components.”

Caveats 5

  • a SAT verdict reflects arithmetic reachability within the encoded pattern, not confirmed reachability along all execution paths of the full program.
  • V1 - No sandbox source access. We have not analyzed the Mythos sandbox code.
  • V2 - COBALT coverage is bounded. COBALT’s invariant set covers CWE-190, 191, 125, and 476. A arithmetic pattern outside this set would not be detected.
  • V3 - Post-escape layers lose authority. VERDICT and DIRECTIVE-4 operate within the agent’s execution context. If an escape is complete before these layers execute, they cannot constrain post-escape actions.
  • V4 - escape vectors. A sufficiently capable agent may identify escape paths outside the CWE-190/191/125/476 set.

What’s new here 4

  • Applies Z3 SMT solving to pre-deployment detection of CWE-190/191 arithmetic overflow patterns in AI sandbox infrastructure.
  • Produces both SAT exploitation witnesses and UNSAT certificates when input bounds are added, enabling formal guarantees of safety.
  • Demonstrates the approach on four production C/C++ codebases rather than synthetic benchmarks.
  • Integrates the verifier into a four-layer containment architecture (COBALT, VERDICT, DIRECTIVE-4, SENTINEL).

Threat model stated by the source

AdversaryClaude Mythos model
Capabilityexploits reachable CWE-190/191 arithmetic vulnerabilities in sandbox C/C++ code
AssumesA1: No pre-deployment code verification; A2: No pre-execution action constraints; A3: No reported output-review layer; A4: Insufficient runtime observability