CVE-2025-4658: Github.com/openpubkey/opkssh Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-56wx-66px-9j66
CWE-305
Published
Advisory Summary

CVE-2025-4658 is a CRITICAL authentication bypass vulnerability (CWE-305: Authentication Bypass by Primary Weakness) affecting Github.com/openpubkey/opkssh libraries in the Go ecosystem. The issue involves opkssh vulnerable to authentication bypass. Remediation is available by upgrading affected packages to version 0.5.0.

CVE-2025-4658 at a Glance

CVE Identifier CVE-2025-4658
GHSA Identifier GHSA-56wx-66px-9j66
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-305: Authentication Bypass by Primary Weakness
Affected Product Github.com/openpubkey/opkssh
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-4658

To remediate this vulnerability, upgrade all affected Github.com/openpubkey/opkssh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/openpubkey/opkssh fixed: 0.5.0
Upgrade github.com/openpubkey/opkssh to 0.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/openpubkey/opkssh

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-4658, inspect your project dependencies for Github.com/openpubkey/opkssh:

inspect dependencies for github.com/openpubkey/opkssh

Analyze the terminal output to locate any version of Github.com/openpubkey/opkssh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-305: Authentication Bypass by Primary Weakness, where the authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error. In Github.com/openpubkey/opkssh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Versions of OpenPubkey library prior to 0.10.0 contained a vulnerability that would allow a specially crafted JWS to bypass signature verification. As OPKSSH depends on the OpenPubkey library for authentication, this vulnerability in OpenPubkey also applies to OPKSSH versions prior to 0.5.0 and would allow an attacker to bypass OPKSSH authentication. ### Patches The vulnerability does not exist in more recent versions of OPKSSH. his only impacts OPKSSH when used to verify ssh keys on a server, the OPKSSH client is unaffected. To remediate upgrade to a version of OPKSSH v0.5.0 or greater. To determine if you are vulnerable run on your server: ```bash opkssh --version ``` If the version is less than 0.5.0 you should upgrade. To upgrade to the latest version run: ```bash wget -qO- "https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh" | sudo bash ``` ### References [CVE-2025-4658](https://www.cve.org/CVERecord?id=CVE-2025-4658) The upstream vulnerability in OpenPubkey is [CVE-2025-3757](https://www.cve.org/CVERecord?id=CVE-2025-3757) and has the security advisory https://github.com/openpubkey/openpubkey/security/advisories/GHSA-537f-gxgm-3jjq

CVE-2025-4658 Affected Github.com/openpubkey/opkssh Versions

1 component(s)
Fixed Versions:
0.5.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/openpubkey/opkssh
Go
< 0.5.0
0.5.0

References

Frequently Asked Questions

What is CVE-2025-4658?
CVE-2025-4658 is a security vulnerability in Github.com/openpubkey/opkssh involving OPKSSH Vulnerable to Authentication Bypass under CWE-305: Authentication Bypass by Primary Weakness.
Which Github.com/openpubkey/opkssh versions are affected?
Affected versions include releases prior to 0.5.0 across affected packages: github.com/openpubkey/opkssh.
What version fixes CVE-2025-4658?
Upgrading to 0.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/openpubkey/opkssh affected?
Yes, github.com/openpubkey/opkssh is affected in releases prior to 0.5.0. Upgrade your dependency to 0.5.0 or later.
What CWE is associated with CVE-2025-4658?
CVE-2025-4658 is classified under CWE-305: Authentication Bypass by Primary Weakness (The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.).
How can I check Go dependencies for CVE-2025-4658?
Run the dependency tree command: 'inspect dependencies for github.com/openpubkey/opkssh'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-56wx-66px-9j66",
  "modified" : "2025-05-13T21:34:58Z",
  "published" : "2025-05-13T21:34:58Z",
  "aliases" : [ "CVE-2025-4658" ],
  "summary" : "OPKSSH Vulnerable to Authentication Bypass ",
  "details" : "### Impact\n\nVersions of OpenPubkey library prior to 0.10.0 contained a vulnerability that would allow a specially crafted JWS to bypass signature verification. As OPKSSH depends on the OpenPubkey library for authentication, this vulnerability in OpenPubkey also applies to OPKSSH versions prior to 0.5.0 and would allow an attacker to bypass OPKSSH authentication.\n\n### Patches\n\nThe vulnerability does not exist in more recent versions of OPKSSH. his only impacts OPKSSH  when used to verify ssh keys on a server, the OPKSSH client is unaffected. To remediate upgrade to a version of OPKSSH v0.5.0 or greater.\n\nTo determine if you are vulnerable run on your server:\n\n```bash\nopkssh --version\n```\n\nIf the version is less than 0.5.0 you should upgrade. To upgrade to the latest version run:\n\n```bash\nwget -qO- \"https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh\" | sudo bash\n``` \n\n\n### References\n\n[CVE-2025-4658](https://www.cve.org/CVERecord?id=CVE-2025-4658)\n\nThe upstream vulnerability in OpenPubkey is [CVE-2025-3757](https://www.cve.org/CVERecord?id=CVE-2025-3757) and has the security advisory https://github.com/openpubkey/openpubkey/security/advisories/GHSA-537f-gxgm-3jjq",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/openpubkey/opkssh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openpubkey/opkssh/security/advisories/GHSA-56wx-66px-9j66"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4658"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openpubkey/opkssh"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-305" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-13T21:34:58Z",
    "nvd_published_at" : "2025-05-13T17:16:04Z"
  }
}