Safeguard
Vulnerability Analysis•

CVE-2025-4658: Critical JWS Signature Bypass in OpenPubkey

CVE-2025-4658: OpenPubkey before 0.10.0 and OPKSSH before 0.5.0 can accept a forged JWS. Upgrade to OpenPubkey 0.10.0 and OPKSSH 0.5.0 or later.

Safeguard Security Team
3 min read

CVE-2025-4658 is a critical signature verification flaw (CVSS 9.8) in the OpenPubkey library before 0.10.0. A specially crafted JWS can bypass verification, which also affects OPKSSH before 0.5.0 and lets an attacker bypass its authentication. Upgrade to OpenPubkey 0.10.0 and OPKSSH 0.5.0 or later.

What's affected

The NVD record, published by Cloudflare as the CNA, says OpenPubkey versions before 0.10.0 are affected. OPKSSH depends on OpenPubkey for authentication, so OPKSSH versions before 0.5.0 are affected too.

The record states the fixed versions through its wording: OpenPubkey 0.10.0 and OPKSSH 0.5.0. It links the OPKSSH repository rather than a detailed advisory, so read the repository's release notes to confirm.

How to check if you're exposed

For OPKSSH, check the version on every server where you installed it. For code that imports OpenPubkey, check your module files.

  • Run the command shown below on the server where OPKSSH runs, if your build provides it, or check the package manager entry.
  • In Go projects, run go list -m github.com/openpubkey/openpubkey and compare with v0.10.0.
  • Search all go.mod and go.sum files in your repositories with the command shown below.
  • Check container images and release artifacts for embedded OPKSSH binaries.

The free in-browser dependency scan accepts dependency files in the browser and flags known vulnerable versions of Go modules.

Commands referred to above, in order:

opkssh --version
grep -r openpubkey --include=go.mod .

What to do now

  1. Upgrade OPKSSH to 0.5.0 or later on every SSH server that uses it.
  2. Upgrade the OpenPubkey library to 0.10.0 or later in your own code, then rebuild and redeploy.
  3. Keep a second SSH access method for administrators, such as key based access over a management network, while you roll out the update.
  4. Review SSH authentication logs for logins that do not match your identity provider's records.
  5. Check that policies and allowed identities in your OPKSSH configuration are still what you expect.
  6. Add a dependency check to your build so a vulnerable authentication library fails the pipeline.

Why it matters

The record lists CWE-305 (Authentication Bypass by Primary Weakness), CWE-347 (Improper Verification of Cryptographic Signature). A JSON Web Signature is only as good as the code that checks it. If a crafted message can pass verification, the identity inside it can be forged, and everything built on that identity inherits the weakness.

Here the consequence is a login bypass for SSH access, which is a direct path onto servers. The vector (AV:N, AC:L, PR:N, UI:N) reflects that. The record does not mark this CVE as exploited in the wild, and it is not on the CISA Known Exploited Vulnerabilities list.

Because OPKSSH imports OpenPubkey, this is also a lesson in transitive dependencies: a fix in the library does not help until each tool that bundles it ships a new release.

Try it yourself

The demo shows how to find which findings already have a fixed version you can move to today.

Click through it at your own pace, or open it full screen.

Quick check

Which versions fix it?

OpenPubkey 0.10.0 and OPKSSH 0.5.0, according to the record.

Why does OPKSSH appear in the record?

It depends on OpenPubkey for authentication, so it inherits the verification flaw.

Sources

Last reviewed: 18 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.