{"id":"GHSA-4r5x-x283-wm96","revision":"78fd6df7e427427f95d9afe37d82051c","records":[{"revision":"78fd6df7e427427f95d9afe37d82051c","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-4r5x-x283-wm96","aliases":["CVE-2023-43651"],"title":"Jumpserver Koko vulnerable to remote code execution on the host system via MongoDB shell ","description":"### Impact\n\nAn authenticated user can exploit a vulnerability in MongoDB sessions to execute arbitrary commands, leading to remote code execution. This vulnerability may further be leveraged to gain root privileges on the host system.\n\n### Details\nThrough the WEB CLI interface provided by koko, a user logs into the authorized mongoDB database and exploits the MongoDB session to execute arbitrary commands.\n\n```\nadmin> const { execSync } = require(\"child_process\")\nadmin> console.log(execSync(\"id; hostname;\").toString())\nuid=0(root) gid=0(root) groups=0(root)\njms_koko\nadmin> \n```\n\n### Patches\nSafe versions: \n- v2.28.20\n- v3.7.1 \n\n### Workarounds\nIt is recommended to upgrade the safe versions.\n\nAfter upgrade, you can use the same method to check whether the vulnerability is fixed.\n```\nadmin> console.log(execSync(\"id; hostname;\").toString())\n/bin/sh: line 1: /bin/hostname: Permission denied\n```\n\n### References\nThanks for **Oskar Zeino-Mahmalat** of [Sonar](https://sonarsource.com/) found and report this vulnerability ","state":0,"publishedAt":"2023-10-24T19:47:50+00:00","modifiedAt":"2026-09-10T03:49:24.6765382+00:00","affected":[{"ecosystem":"Go","name":"github.com/jumpserver/koko","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.28.20"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/jumpserver/koko","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.0.0"},{"kind":"fixed","version":"3.7.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/jumpserver/jumpserver/security/advisories/GHSA-4r5x-x283-wm96","https://nvd.nist.gov/vuln/detail/CVE-2023-43651","https://github.com/jumpserver/koko/commit/7d80db95d17c8f42bdf50260dfc21dc2bd0452c2","https://github.com/jumpserver/koko/commit/857f8b9e41f0930dc6190a35d8601fffa5e884e7","https://github.com/jumpserver/koko"],"sourceUrl":"https://github.com/advisories/GHSA-4r5x-x283-wm96","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4r5x-x283-wm96","identifiers":["GHSA-4r5x-x283-wm96","CVE-2023-43651"]},"retained":false,"historicalAffected":[]}],"coverage":[]}