Summary
Caddy-SSH vulnerable to Authorization Bypass due to incorrect usage of PAM library
Not invoking a call to pam_acct_mgmt after a call to pam_authenticate to check the validity of a login can lead to an authorization bypass.
Exploitability
The attack can be carried over the network. A complex non-standard configuration or a specialized condition is required for the attack to be successfully conducted. The attacker also requires access to a users credentials, be it expired, for an attack to be successful. There is no user interaction required for successful execution. The attack can affect components outside the scope of the target module.
Root Cause Analysis
In this case, in the following PAM transaction, only a call to pam.Authenticate is used to login a user.
This implies that a user with expired credentials can still login.
The bug can be verified easily by creating a new user account, expiring it with chage -E0 <username> and then trying to log in with the expired credentials.
References
Impact
Using this attack vector, an attacker may access otherwise restricted parts of the system. The attack can be used to gain access to confidential files like passwords, login credentials and other secrets. Hence, it has a high impact on confidentiality. It may also be directly used to affect a change on a system resource. Hence has a medium to high impact on integrity. This attack may not be used to affect the availability of the system. Taking this account an appropriate CVSS v3.1 vector would be
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
The application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.
GHSA-GMHJ-XJFH-CF6M has a CVSS score of 7.7 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. No fixed version is listed yet, so configuration controls and monitoring matter more in the interim.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
This can be fixed by invoking a call to pam.AcctMgmt after a successful call to pam.Authenticate
Frequently Asked Questions
- What is GHSA-GMHJ-XJFH-CF6M? GHSA-GMHJ-XJFH-CF6M is a high-severity improper authentication vulnerability in github.com/mohammed90/caddy-ssh (go), affecting versions = 0.0.1. No fixed version is listed yet. The application does not adequately verify the identity of a user, device, or process before granting access.
- How severe is GHSA-GMHJ-XJFH-CF6M? GHSA-GMHJ-XJFH-CF6M has a CVSS score of 7.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/mohammed90/caddy-ssh are affected by GHSA-GMHJ-XJFH-CF6M? github.com/mohammed90/caddy-ssh (go) versions = 0.0.1 is affected.
- Is there a fix for GHSA-GMHJ-XJFH-CF6M? No fixed version is listed for GHSA-GMHJ-XJFH-CF6M yet. Monitor the advisory for updates and apply mitigations in the interim.
- Is GHSA-GMHJ-XJFH-CF6M exploitable, and should I be worried? Whether GHSA-GMHJ-XJFH-CF6M is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-GMHJ-XJFH-CF6M is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-GMHJ-XJFH-CF6M? No fixed version is listed yet. In the interim: Keep the dependency up to date. Ensure authentication checks are present and cannot be bypassed by manipulating request parameters.