/

CVE-2026-46669

Severity:

HIGH RISK

(7.5)

Input Validation Flaw (CWE-20) in OpenVM Pairing Check

CVE-2026-46669

Analyzed

Vulnerability type

Category:

Input Validation

CWE:

CWE-20

Impact:

Cryptographic Integrity Violation

Severity:

HIGH RISK

(7.5)

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

A cryptographic input validation flaw in OpenVM's pairing guest library causes the try_honest_pairing_check function to skip enforcing that a scaling factor lies in the proper subfield of Fp12.

When this condition is not met, the pairing check can yield incorrect results, potentially allowing invalid proofs or statements to be accepted under certain configurations.

Affected context

The vulnerability arises in OpenVM deployments that use the openvm-pairing guest library's try_honest_pairing_check as part of their zkVM proof verification logic.

It is relevant when the pairing check is relied upon for soundness and correctness, and when the scaling factor s is derived from inputs that are not rigorously constrained to the proper subfield of Fp12.

Environments that assume the pairing check is a strong integrity barrier may be at risk if they do not add additional validation or constraints around the inputs to this routine.

Exploit preconditions

  • Attack surface: Proof or witness submission interfaces, circuits, or verification flows that rely on try_honest_pairing_check.
  • Required access: Ability to influence or construct the pairing inputs, including the scaling factor s, typically through crafted proofs, witnesses, or protocol messages.
  • Trigger point: Execution of try_honest_pairing_check where s is not guaranteed to be in the appropriate subfield of Fp12.
  • Why exploitation is possible: The function applies Theorem 3 from the referenced paper but omits the invariant that s must be confined to a proper subfield, allowing specially crafted inputs to cause the pairing check to return a seemingly valid result for an invalid relationship.

Why this happens

At its core, this issue is an input validation problem in a cryptographic context.

The implementation depends on a mathematical theorem that holds only when a scaling factor s is restricted to a specific subfield of Fp12, but the code does not enforce that restriction.

This maps to CWE-20: Improper Input Validation, where the system fails to validate that inputs satisfy the preconditions required for safe and correct operation.

By not checking that s is in the required subfield, the pairing check operates outside the assumptions of the underlying security proof, creating a gap between the intended cryptographic guarantee and the actual behavior of the implementation.

Potential impact

  • Invalid or malformed proofs may be accepted as valid under certain constructions.
  • Soundness of higher-level zkVM protocols could be weakened, potentially enabling protocol-level misbehavior.
  • Integrity guarantees of computations that rely on pairing-based checks can be undermined.
  • Downstream systems that trust the pairing check as a correctness oracle may base decisions on incorrect verification results.

General mitigation guidance

Effective mitigation focuses on enforcing all mathematical preconditions for cryptographic routines and constraining untrusted inputs early:

  • Validate that all elements used in pairing checks, including scaling factors like s, are within the correct field or subfield before invoking the verification algorithm.
  • Design APIs so that unsafe or unconstrained field elements cannot be passed into sensitive cryptographic primitives without explicit normalization or checks.
  • Encapsulate pairing logic in higher-level, well-typed abstractions that statically restrict how field elements are constructed and combined.
  • Apply the principle of least privilege to cryptographic inputs: only accept data that has been derived through vetted, protocol-compliant transformations rather than arbitrary user-controlled values.
  • Document the mathematical invariants required by each cryptographic function so that callers are less likely to misuse them in new circuits or protocols.

How teams detect issues like this

Organizations can look for similar issues by combining cryptographic code review with automated analysis:

  • During manual review, verify that every cryptographic function invocation enforces or assumes clearly documented algebraic invariants, and confirm those invariants are checked at the boundaries.
  • Use static analysis or linting rules to flag direct use of low-level field operations in pairing contexts where no accompanying validation or normalization is present.
  • Define internal code review checklists for cryptographic modules that explicitly ask whether domain, subgroup, and subfield checks are enforced for all group and field elements.
  • Employ formal verification, property-based testing, or differential testing to exercise pairing checks with adversarial input distributions and confirm that invalid inputs are consistently rejected.

Sources

SourceLink
github.comgithub.com/openvm-org/openvm/releases/tag/v1.6.0
github.comgithub.com/openvm-org/openvm/security/advisories/GHSA-76mq-v757-53gr

Frequently asked

questions

It can be, depending on how the zkVM or application exposes proof or witness submission interfaces. If an attacker can feed crafted pairing inputs or proofs into a system that relies directly on try_honest_pairing_check, the issue can be exploitable over that interface.

An attacker generally needs the ability to supply or influence the data that determines the scaling factor s used in the pairing check. This often corresponds to creating or modifying proofs, witnesses, or protocol messages that are later verified inside the zkVM.

The safest pattern is to enforce all field and subfield invariants required by the underlying cryptographic theorems at the point where inputs are constructed or accepted. Specifically, ensure that scaling factors and group elements are validated, normalized, or rejected if they fall outside the mathematically allowed domains.

Prevention typically involves combining rigorous specification of cryptographic preconditions with defensive implementation practices:

  • Clearly document algebraic invariants for each primitive.
  • Encode these invariants in types or helper APIs that enforce correct construction.
  • Subject cryptographic components to focused reviews by specialists and, where feasible, formal methods to ensure the code matches the security proofs.
Find out what's already
exploitable in your codebase.