CVE-2026-125328: pgEdge Go LLM Library Leaks Provider API Keys in Error Messages

The pgEdge Go LLM Library exposed fragments of configured LLM provider API keys through error messages returned by an unauthenticated health endpoint, allowing remote attackers to obtain credential material.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 3 min read
Share
A developer looking concerned at a computer screen displaying error messages with partially visible API keys highlighted in red
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources

The pgEdge Go LLM Library, a unified Go interface for multiple LLM providers, disclosed fragments of operator API keys through error messages. The vulnerability affected versions 0.1.0 and 0.1.1, allowing unauthenticated remote callers to obtain parts of third-party provider credentials.

i10X Quick Take

Quick Take

  1. What: CVE-2026-125328 in pgEdge Go LLM Library exposed provider API key fragments in error messages
  2. Who is affected: Applications using versions 0.1.0 or 0.1.1 that expose the HTTP proxy without an Authorize hook
  3. Severity: Medium (CVSS 5.8), unauthenticated network access, credential disclosure
  4. Fixed version: 0.2.0
  5. What to do: Upgrade to version 0.2.0 or later and rotate any exposed provider API keys

In plain English

A Go library that helps developers connect to different AI services had a security flaw. When the library’s health check feature failed to connect to an AI provider (like OpenAI or Anthropic), it would show part of the secret password (API key) in the error message. Anyone who could access the health check page could see these password fragments, even without logging in. The developers fixed this in version 0.2.0 by automatically hiding all credentials in error messages.

What you should do: If you use this library, you should update to the new version and change your AI provider passwords, especially if the health check was accessible to the internet.

What happened

The vulnerability existed in the library’s HTTP proxy component. The GET /v1/health endpoint in llm/proxy/handlers.go used handleHealth to ping configured LLM providers with the operator’s real credentials. When a provider rejected the configured credential, the endpoint returned the provider’s error text verbatim to the caller.

LLM providers characteristically quote a partially masked form of the submitted API key in authentication failure messages. For example, OpenAI might return an error stating Incorrect API key provided: sk-proj-…abc123. The health handler relayed these messages without redaction.

The Authorize hook in llm/proxy/proxy.go permitted access by default when the consuming application did not configure it. The authorize() function returned true immediately when no Authorize hook was set, making the health endpoint reachable by anyone who could reach the listening port.

Every provider in the library lifted the upstream API’s error.message string verbatim into ProviderError.Message. The Voyage provider went further and formatted the entire raw response body into the error. This meant the credential fragment was already present in the error object by the time it crossed the library boundary.

The library’s proxy had the identical issue in four places: the JSON body written by writeError, the server-sent event: error payload, and both per-provider strings in the GET /v1/health response.

What you should do

Upgrade to version 0.2.0 or later immediately. The fixed version redacts credentials from provider error messages unconditionally.

Rotate any LLM provider credential (OpenAI, Anthropic, Google AI Studio, Voyage AI, or Ollama gateway keys) that was configured on an affected version where the proxy was reachable without an Authorize hook. This is particularly urgent if a provider was rejecting that key at the time, as the rejection would have disclosed the key fragment.

Note that upgrading does not undo a disclosure that already happened. If logs or monitoring systems captured the error messages, those records may contain the disclosed fragments.

As a temporary workaround before upgrading, set an Authorize hook on the proxy to close the unauthenticated route to the health endpoint, or restrict network access to the listening port. Neither workaround removes the underlying disclosure for callers who do reach the endpoint.

What it means

The fix in version 0.2.0 introduces a new internal package, llm/internal/redact, which scrubs messages in three passes: exact replacement of a configured secret, fragment matching against that secret for truncated or masked echoes, and pattern matching on known credential shapes (OpenAI sk- prefix, Anthropic sk-ant- prefix, Google AIza prefix, Voyage pa- prefix, HTTP Authorization values, and labelled values like api_key=).

Adjacent placeholders separated only by masking characters collapse, so a single echoed key yields one [REDACTED] rather than one per surviving fragment. The fragment pass ignores secrets shorter than twelve characters to prevent junk or placeholder keys from redacting ordinary prose.

Redaction is unconditional and applies before the message is stored in ProviderError. The unredacted text is never retained, and there is no option to disable redaction. The proxy applies the same redaction on the way to the wire for all error responses.

The OnError hook continues to receive the unmodified ErrorInfo because that hook runs in the operator’s own process for server-side logging and is not a trust boundary.

The disclosed material authenticates to a third-party provider account (OpenAI, Anthropic, Google, Voyage) rather than to pgEdge software itself. Both affected versions (0.1.0 and 0.1.1) are released tags and resolve through the public Go module proxy.

Sources

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Georgia Tech’s Academic AI Playbook: 20 Lessons From 67 Real Courses, Free to Reuse
  2. Arcfront’s $1B Run Rate: What the AI Data Startup Confirms and What It Doesn’t
  3. GPT-6.2 Astra Tops Blueprint-Bench 2, 70% Above May Leader GPT-5.5
  4. Deutsche Telekom Puts 100 Million Euros Into Mistral for Sovereign AI in Germany
  5. Inkling 2 Mini: Thinking Machines’ Looped Open Model Tops Qwen on Coding Tests