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.
Quick Take
- What: CVE-2026-125328 in pgEdge Go LLM Library exposed provider API key fragments in error messages
- Who is affected: Applications using versions 0.1.0 or 0.1.1 that expose the HTTP proxy without an Authorize hook
- Severity: Medium (CVSS 5.8), unauthenticated network access, credential disclosure
- Fixed version: 0.2.0
- 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.



