Skip to content

[GHSA-56wx-66px-9j66] OPKSSH Vulnerable to Authentication Bypass #5528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

byt3n33dl3
Copy link

Updates

  • Description
  • References
  • Summary

Comments
Vulnerability Details:

A critical vulnerability exists in versions of the OpenPubkey library prior to 0.10.0 that allows a specially crafted JSON Web Signature (JWS) to bypass signature verification. Since OPKSSH depends on OpenPubkey for SSH key authentication, this flaw affects OPKSSH versions prior to 0.5.0, enabling attackers to bypass authentication on affected servers.

Technical Summary:

The vulnerability arises from improper validation of the JWS signature, allowing an attacker to craft a token that the verification process mistakenly accepts as valid. This flaw undermines the cryptographic guarantees of the signature, permitting unauthorized access without possession of the legitimate private key.

Impact:

  • Unauthorized SSH server access by bypassing authentication.
  • Potential compromise of server integrity and confidentiality.

Exploitation Example:

An attacker can create a malicious JWS token with manipulated header or payload fields that exploit the verification bypass, gaining unauthorized access to the SSH server.

Mitigation:

  • Immediately upgrade OPKSSH to version 0.5.0 or later, which includes the patched OpenPubkey library (version 0.10.0 or higher).
  • Check your current OPKSSH version and upgrade if necessary with:

bash

if [ "$(opkssh --version | cut -d '.' -f1,2)" \< "0.5" ]; then
  wget -qO- "https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh" | sudo bash
else
  echo "OPKSSH version is up to date."
fi
  • Monitor SSH server logs for suspicious authentication attempts until the upgrade is applied.

Additional Notes:

Few improvements could make the advisory clearer and more actionable. For example, explicitly stating the risk level (e.g., critical or high) helps prioritize the urgency. Adding a brief technical summary of why the JWS signature verification fails can help advanced users understand the root cause. Also, clarifying that the vulnerability only affects server-side verification but not client-side usage reduces confusion.

Including a short example or snippet showing how to check the version and upgrade in a single command line can improve usability.

@Copilot Copilot AI review requested due to automatic review settings May 14, 2025 08:21
@github
Copy link
Collaborator

github commented May 14, 2025

Hi there @EthanHeilman! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.

This change will be reviewed by our Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the advisory JSON file to clarify the vulnerability details and improve the mitigation instructions for CVE-2025-4658.

  • Updated the summary field to modify its messaging.
  • Revised the details section with additional mitigation steps and phrasing improvements.
  • Adjusted the references to point to a simplified URL.
Comments suppressed due to low confidence (1)

advisories/github-reviewed/2025/05/GHSA-56wx-66px-9j66/GHSA-56wx-66px-9j66.json:10

  • [nitpick] Consider rewording the upgrade instructions. The phrase 'upgrade immediately test by using wget:' is unclear—rephrase it to clearly guide users on executing the upgrade command, for example, by removing the ambiguous 'test' phrasing.
  "details": "_Adding another OPKSSH vulnerable to authentication bypass on JWS cases_\n\nSince OPKSSH relies on OpenPubkey for SSH key authentication, this flaw extends to OPKSSH versions prior to 0.5.0, enabling an attacker to bypass authentication on affected servers.\n\nAnd since the examples already given by another vulnhunter, my add-on would be on the `mitigation:`\n\n- Upgrade OPKSSH to version 0.5.0 or later, which includes the patched OpenPubkey library (version 0.10.0 or higher).\n- Verify your current OPKSSH version by running:\n\n```sh\nopkssh --version\n```\n\nIf your version is less than 0.5.0, upgrade immediately test by using `wget:`\n\n```sh\nwget -qO- "https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh" | sudo bash\n```\n\n- This vulnerability only affects OPKSSH when used as an SSH server key verification tool; the OPKSSH client is not impacted.\n- The upstream OpenPubkey vulnerability is tracked as CVE-2025-3757 and has the advisory GHSA-537f-gxgm-3jjq.\n- The OPKSSH vulnerability is tracked as [CVE-2025-4658.](https://nvd.nist.gov/vuln/detail/CVE-2025-4658)\n\n## Summary\n\nVulnerability Details:\n\nA critical vulnerability exists in versions of the OpenPubkey library prior to 0.10.0 that allows a specially crafted JSON Web Signature (JWS) to bypass signature verification. Since OPKSSH depends on OpenPubkey for SSH key authentication, this flaw affects OPKSSH versions prior to 0.5.0, enabling attackers to bypass authentication on affected servers.\n\nTechnical Summary:\n\nThe vulnerability arises from improper validation of the JWS signature, allowing an attacker to craft a token that the verification process mistakenly accepts as valid. This flaw undermines the cryptographic guarantees of the signature, permitting unauthorized access without possession of the legitimate private key.\n\nImpact:\n\n- Unauthorized SSH server access by bypassing authentication.\n- Potential compromise of server integrity and confidentiality.\n\nExploitation Example:\n\nAn attacker can create a malicious JWS token with manipulated header or payload fields that exploit the verification bypass, gaining unauthorized access to the SSH server.\n\nMitigation:\n\n- Immediately upgrade OPKSSH to version 0.5.0 or later, which includes the patched OpenPubkey library (version 0.10.0 or higher).\n- Check your current OPKSSH version and upgrade if necessary with:\n\nbash\n\n```sh\nif [ "$(opkssh --version | cut -d '.' -f1,2)" \< "0.5" ]; then\n  wget -qO- "https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh" | sudo bash\nelse\n  echo "OPKSSH version is up to date."\nfi\n```\n\n- Monitor SSH server logs for suspicious authentication attempts until the upgrade is applied.\n\nAdditional Notes:\n\n- This vulnerability affects only OPKSSH when used for SSH server key verification; the OPKSSH client is not impacted.\n- The upstream OpenPubkey vulnerability is tracked as CVE-2025-3757 (GHSA-537f-gxgm-3jjq).\n- The OPKSSH vulnerability is tracked as CVE-2025-4658 (GHSA-56wx-66px-9j66).\n\nFew improvements could make the advisory clearer and more actionable. For example, explicitly stating the risk level (e.g., critical or high) helps prioritize the urgency. Adding a brief technical summary of why the JWS signature verification fails can help advanced users understand the root cause. Also, clarifying that the vulnerability only affects server-side verification but not client-side usage reduces confusion.\n\nIncluding a short example or snippet showing how to check the version and upgrade in a single command line can improve usability."

"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",
"summary": "Adding another OPKSSH vulnerable to authentication bypass on JWS cases",
Copy link
Preview

Copilot AI May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider simplifying the 'summary' field to state the vulnerability directly (e.g., “OPKSSH Vulnerable to Authentication Bypass”) so it aligns with the title and avoids ambiguous phrasing.

Copilot uses AI. Check for mistakes.

{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-4658"
"url": "https://github.com/openpubkey/openpubkey"
Copy link
Preview

Copilot AI May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the reference provides direct access to detailed advisory or CVE information so that users can more easily verify vulnerability specifics. Relying solely on the GitHub repository may not offer sufficient context.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot changed the base branch from main to byt3n33dl3/advisory-improvement-5528 May 14, 2025 08:22
@JonathanLEvans
Copy link

Hi @byt3n33dl3, this update does not seem to contain any new information. Am I missing something?

@byt3n33dl3
Copy link
Author

heyo,

in the case of New Information, if you refereed to a new exploits then No. My contribution was adding an example on the use cases and adding a research to the OPKSSH vulnerability on (CVE-2025-4658) GHSA-56wx-66px-9j66.

since I cant report the same vuln, however the use case is different, so I'm adding my case. 🫡

e.g

wget -qO- "https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh" | sudo bash

Screenshot 2025-05-16 at 22-46-53 OPKSSH Vulnerable to Authentication Bypass · CVE-2025-4658 · GitHub Advisory Database

@EthanHeilman
Copy link

@byt3n33dl3 I agree with copilot here, changing the summary from "summary": "OPKSSH Vulnerable to Authentication Bypass ", to "summary": "Adding another OPKSSH vulnerable to authentication bypass on JWS cases" seems incorrect

@byt3n33dl3 byt3n33dl3 closed this May 16, 2025
@github-actions github-actions bot deleted the byt3n33dl3-GHSA-56wx-66px-9j66 branch May 16, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants