{"answers":{"affected":"2 open source packages ship an affected version, including github.com/mohammed90/caddy-ssh.","exploited":"There is no known exploitation of GHSA-gmhj-xjfh-cf6m in the wild and no public exploit code.","fix":"No fix has been published for GHSA-gmhj-xjfh-cf6m yet. Limit exposure of the affected software until one is available.","what":"GHSA-gmhj-xjfh-cf6m is an authentication bypass vulnerability in github.com/mohammed90/caddy-ssh, published on 23 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-gmhj-xjfh-cf6m and fix it if it is affected.\n\nWhat it is: GHSA-gmhj-xjfh-cf6m is an authentication bypass vulnerability in github.com/mohammed90/caddy-ssh, published on 23 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-gmhj-xjfh-cf6m in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/mohammed90/caddy-ssh (Go): affected all versions; no fix listed\n- github.com/mohammed90/caddy-ssh (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-gmhj-xjfh-cf6m/ (Markdown: https://insights.sbomify.com/GHSA-gmhj-xjfh-cf6m/index.md)","id":"GHSA-gmhj-xjfh-cf6m","markdown":"https://insights.sbomify.com/GHSA-gmhj-xjfh-cf6m/index.md","name":"GHSA-gmhj-xjfh-cf6m","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Caddy SSH plugin","requires_auth":"low_privilege","summary":"Attackers with expired credentials can bypass authorization checks in Caddy-SSH to access restricted system resources and confidential data.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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.\n\n### Impact\n\n#### Exploitability\n\nThe 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.\n\n#### Impact\n\nUsing 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\n[AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L\u0026version=3.1)\n\n### Root Cause Analysis\n\nIn this case, in the following PAM transaction, only a call to `pam.Authenticate` is used to login a user.\n\nhttps://github.com/mohammed90/caddy-ssh/blob/1d980ceea6e67765daf19b5e644c7a0773fdaa13/internal/authentication/os/pam.go#L60\n\nThis implies that a user with expired credentials can still login.\n\nThe bug can be verified easily by creating a new user account, expiring it with `chage -E0 \u003cusername\u003e` and then trying to log in with the expired credentials.\n\n### Patches\nThis can be fixed by invoking a call to `pam.AcctMgmt` after a successful call to `pam.Authenticate`\n\n### References\n* [Man Page for pam_acct_mgmt](https://man7.org/linux/man-pages/man3/pam_acct_mgmt.3.html)\n* [CWE-863](http://cwe.mitre.org/data/definitions/863.html)\n* [CWE-285](http://cwe.mitre.org/data/definitions/285.html)","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Caddy-SSH vulnerable to Authorization Bypass due to incorrect usage of PAM library","id":"GHSA-gmhj-xjfh-cf6m","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":[],"last_affected":[],"package":"github.com/mohammed90/caddy-ssh","purl":null,"source":"GHSA-gmhj-xjfh-cf6m"},{"ecosystem":"Go","fixed":[],"introduced":[],"last_affected":[],"package":"github.com/mohammed90/caddy-ssh","purl":"pkg:golang/github.com/mohammed90/caddy-ssh","source":"GHSA-gmhj-xjfh-cf6m"}],"products":null,"published":"2022-09-23","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers with expired credentials can bypass authorization checks in Caddy-SSH to access restricted system resources and confidential data.","url":"https://insights.sbomify.com/GHSA-gmhj-xjfh-cf6m/"}