DEV Community

correctover
correctover

Posted on

Zero-signature forgeries accepted by the most popular Ed25519 library — plus an OpenAI Agents SDK metadata trust flaw

Two findings from our agent-security audit practice, both verified against latest releases on 2026-11-19, both with one-command reproduction. Issues are already filed upstream.

Finding 1: @noble/curves Ed25519 verification accepts small-order public keys with a zero signature

RFC 8032 §8.8 recommends rejecting small-order public keys during verification. The most popular modern JS crypto library — @noble/curves 2.4.0 — accepts a zero-signature forgery for all 13 small-order/torsion public-key encodings we tested:

import { ed25519 } from '@noble/curves/ed25519.js';
const sig = new Uint8Array(64).fill(0); // zero signature
const pk = ed25519.Point.BASE.multiply(1n).toBytes();
ed25519.verify(sig, msg, pk); // → true
Enter fullscreen mode Exit fullscreen mode

The interesting part is the ecosystem split. The same vectors are rejected by tweetnacl, and @solana/kit — Solana's official SDK — performs an explicit isSmallOrderPointEncoding pre-check on both the public key and the signature's R encoding before delegating to WebCrypto. In other words: a production consumer deemed the check necessary and implemented it themselves, while the reference library still accepts those keys. Same public key, three verdicts depending on which library a verifier picked.

Full repro matrix: paulmillr/noble-curves#261

If your service, validator, or audit tool calls ed25519.verify() directly as a trust decision, a small-order key + zero signature passes today. There is no strict option to opt into.

Finding 2: OpenAI Agents SDK merges server-declared MCP _meta over application policy metadata

The OpenAI Agents SDK (openai/openai-agents-python, 30k+ stars) lets applications inject trusted local context (tenant IDs, audit tags, auth context) into MCP tool calls via tool_meta_resolver. But the merge order is backwards from a trust-boundary reading: server-declared _meta (fully remote-controlled bytes from list_tools) is applied last and silently overrides resolver output on key collisions.

from agents.mcp.util import MCPUtil
resolver = {'tenant_id': 'tenant-A', 'auth_context': 'app-injected'}   # your local policy
server   = {'tenant_id': 'tenant-B', 'auth_context': 'server-controlled'}  # remote _meta
MCPUtil._merge_mcp_meta(resolver, server)
# {'tenant_id': 'tenant-B', ...}  → server wins, no signature, no provenance
Enter fullscreen mode Exit fullscreen mode

Server-returned result.meta additionally flows into application custom_data_extractor context. The metadata path carries no signature and no provenance in either direction.

Details + fix suggestions: openai/openai-agents-python#6093

The pattern behind both findings

Both are instances of the same trust-boundary principle: protected data must be bound and verifiable, not just present. A verification decision without small-order rejection, and a metadata channel without provenance, both share the shape of "bytes exist, so they're trusted."

We build Correctover — an agent action-layer audit instrument (every tool call carries a signed CCS receipt) — and we publish findings like these with full reproduction because audit claims without replay evidence are worthless. Our IETF drafts (draft-correctover-ccs rev10) formalize this receipt discipline.

Found this useful? Both upstream issues are open — repro scripts are two commands each.

Top comments (0)