{"answers":{"affected":"3 open source packages ship an affected version, including github.com/patrickhener/goshs.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46816 exists.","fix":"Upgrade github.com/patrickhener/goshs to 1.0.5 or later.","what":"CVE-2025-46816 is a critical command injection vulnerability in patrickhener goshs, published on 6 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-46816 and fix it if it is affected.\n\nWhat it is: CVE-2025-46816 is a critical command injection vulnerability in patrickhener goshs, published on 6 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46816 exists.\n\nAffected packages and fixed versions:\n- github.com/patrickhener/goshs (Go): affected from 0.3.4; fixed in 1.0.5\n- github.com/patrickhener/goshs (Go): affected from 0.3.4; fixed in 1.0.5\n- github.com/patrickhener/goshs (Go): affected from 0.3.4; fixed in 1.0.5\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/CVE-2025-46816/ (Markdown: https://insights.sbomify.com/CVE-2025-46816/index.md)","id":"CVE-2025-46816","markdown":"https://insights.sbomify.com/CVE-2025-46816/index.md","name":"CVE-2025-46816","record":{"aliases":["GHSA-rwj2-w85g-5cmm","GO-2025-3672"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Go HTTP server","requires_auth":"none","summary":"Attackers can execute arbitrary commands on goshs servers via websockets when the server is run without specific arguments, bypassing intended restrictions.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.4,"severity":"critical","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","version":"3.0"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-284","name":"Improper Access Control"}],"description":"goshs is a SimpleHTTPServer written in Go. Starting in version 0.3.4 and prior to version 1.0.5, running goshs without arguments makes it possible for anyone to execute commands on the server. The function `dispatchReadPump` does not checks the option cli `-c`, thus allowing anyone to execute arbitrary command through the use of websockets. Version 1.0.5 fixes the issue.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":"2025-06-04","github_poc":1,"max_poc_stars":4,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-06-04T17:58:58Z","kind":"github_poc","ref":"https://github.com/Guilhem7/CVE-2025-46816","stars":4,"title":"POC for exploit of goshs"}],"tier":"weaponised"},"has_fix":true,"headline":"goshs route not protected, allows command execution","id":"CVE-2025-46816","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Lua library commands may lead to integer overflow and potential RCE","id":"CVE-2025-46817"},"packages":[{"ecosystem":"Go","fixed":["1.0.5"],"introduced":["0.3.4"],"last_affected":[],"package":"github.com/patrickhener/goshs","purl":null,"source":"GHSA-rwj2-w85g-5cmm"},{"ecosystem":"Go","fixed":["1.0.5"],"introduced":["0.3.4"],"last_affected":[],"package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"GHSA-rwj2-w85g-5cmm"},{"ecosystem":"Go","fixed":["1.0.5"],"introduced":["0.3.4"],"last_affected":[],"package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"GO-2025-3672"}],"prev":{"headline":"ZITADEL Allows IdP Intent Token Reuse","id":"CVE-2025-46815"},"products":["goshs"],"published":"2025-05-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-05-06","vendors":["patrickhener"]},"summary":"Attackers can execute arbitrary commands on goshs servers via websockets when the server is run without specific arguments, bypassing intended restrictions.","url":"https://insights.sbomify.com/CVE-2025-46816/"}