CVE-2023-43651
JSON

8.6high

Remote code execution on the host system via MongoDB shell in jumpserver

Severity
8.6high CVSS:3.1 by GitHub_M
Exploit likelihood
2.11% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4r5x-x283-wm96

Description

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.

Affected

Product or packageVersionsReported by
jumpserver jumpserver>= 2.0.0, < 2.28.20, >= 3.0.0, < 3.7.1, from 2.0.0 before 2.28.20, from 3.0.0 before 3.7.1CVE List
github.com/jumpserver/koko (Go)from 2.0.0 before 2.28.20, from 3.0.0 before 3.7.1GitHub Advisory Database
fit2cloud jumpserverfrom 2.0.0 before 2.28.20, from 3.0.0 before 3.7.1NVD

All scores

GitHub_M8.6high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H
NVD9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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 host system.

Details

Through the WEB CLI interface provided by koko, a user logs into the authorized mongoDB database and exploits the MongoDB session to execute arbitrary commands.

admin> const { execSync } = require("child_process")
admin> console.log(execSync("id; hostname;").toString())
uid=0(root) gid=0(root) groups=0(root)
jms_koko
admin> 
Patches

Safe versions:

  • v2.28.20
  • v3.7.1
Workarounds

It is recommended to upgrade the safe versions.

After upgrade, you can use the same method to check whether the vulnerability is fixed.

admin> console.log(execSync("id; hostname;").toString())
/bin/sh: line 1: /bin/hostname: Permission denied
References

Thanks for Oskar Zeino-Mahmalat of Sonar found and report this vulnerability

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-43651 changed 2025-03-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-4r5x-x283-wm96 changed 2026-09-10CC-BY-4.0
NVDCVE-2023-43651 changed 2026-06-17Public domain