{"id":"CVE-2023-43651","aliases":["CVE-2023-43651","GHSA-4r5x-x283-wm96"],"related":[],"kind":"vulnerability","state":"published","title":"Remote code execution on the host system via MongoDB shell in jumpserver","summary":"JumpServer is an open source bastion host. An 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 system. Through the WEB CLI interface provided by the koko component, a user logs into the authorized mongoDB database and exploits the MongoDB session to execute arbitrary commands. This vulnerability has been addressed in versions 2.28.20 and 3.7.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"JumpServer is an open source bastion host. An 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 system. Through the WEB CLI interface provided by the koko component, a user logs into the authorized mongoDB database and exploits the MongoDB session to execute arbitrary commands. This vulnerability has been addressed in versions 2.28.20 and 3.7.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"JumpServer es un host de bastionado de código abierto. Un usuario autenticado puede aprovechar una vulnerabilidad en las sesiones de MongoDB para ejecutar comandos arbitrarios, lo que lleva a la ejecución remota de código. Esta vulnerabilidad puede aprovecharse aún más para obtener privilegios de root en el sistema. A través de la interfaz WEB CLI proporcionada por el componente koko, un usuario inicia sesión en la base de datos mongoDB autorizada y explota la sesión de MongoDB para ejecutar comandos arbitrarios. Esta vulnerabilidad se ha solucionado en las versiones 2.28.20 y 3.7.1. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.","source":"nvd"}],"published":"2023-09-27T20:24:08.733Z","modified":"2026-09-10T03:49:24.676Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.28.20","status":"affected"},{"version":">= 3.0.0, < 3.7.1","status":"affected"}],"vendor":"jumpserver","product":"jumpserver","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"2.0.0","fixed":"2.28.20","status":"affected"},{"type":"custom","introduced":"3.0.0","fixed":"3.7.1","status":"affected"}],"vendor":"jumpserver","product":"jumpserver","cpe":"cpe:2.3:a:jumpserver:jumpserver:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.28.20"}],"ecosystem":"Go","package":"github.com/jumpserver/koko","purl":"pkg:golang/github.com/jumpserver/koko","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.7.1"}],"ecosystem":"Go","package":"github.com/jumpserver/koko","purl":"pkg:golang/github.com/jumpserver/koko","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.28.20"},{"status":"affected","introduced":"3.0.0","fixed":"3.7.1"}],"vendor":"fit2cloud","product":"jumpserver","cpe":"cpe:2.3:a:fit2cloud:jumpserver:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/jumpserver/jumpserver/security/advisories/GHSA-4r5x-x283-wm96","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.sonarsource.com/blog/diving-into-jumpserver-attackers-gateway-to-internal-networks-2-2","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-43651","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jumpserver/koko/commit/7d80db95d17c8f42bdf50260dfc21dc2bd0452c2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jumpserver/koko/commit/857f8b9e41f0930dc6190a35d8601fffa5e884e7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jumpserver/koko","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-09-23T18:52:32.591Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-43651","url":"https://www.cve.org/CVERecord?id=CVE-2023-43651","licence":"CVE Terms of Use","modified":"2025-03-25T19:35:30.016Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4r5x-x283-wm96","url":"https://github.com/advisories/GHSA-4r5x-x283-wm96","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:24.676Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-43651","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-43651","licence":"Public domain","modified":"2026-06-17T06:26:09.467Z"}],"updatedAt":"2026-11-25T22:58:28.237Z","epss":{"score":0.02107,"percentile":0.82285,"date":"2026-12-01T12:00:22.000Z"}}