CVE-2024-28185
JSON

10.0critical

Judge0 vulnerable to Sandbox Escape via Symbolic Link

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
7.06% (higher than 94% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

Judge0 is an open-source online code execution system. The application does not account for symlinks placed inside the sandbox directory, which can be leveraged by an attacker to write to arbitrary files and gain code execution outside of the sandbox. When executing a submission, Judge0 writes a `run_script` to the sandbox directory. The security issue is that an attacker can create a symbolic link (symlink) at the path `run_script` before this code is executed, resulting in the `f.write` writing to an arbitrary file on the unsandboxed system. An attacker can leverage this vulnerability to overwrite scripts on the system and gain code execution outside of the sandbox.

Affected

Product or packageVersionsReported by
judge0 judge0<= 1.13.0, up to 1.13.0CVE List

Classification

CWE-59CWE-61

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Judge0 is an open-source online code execution system. The application does not account for symlinks placed inside the sandbox directory, which can be leveraged by an attacker to write to arbitrary files and gain code execution outside of the sandbox. When executing a submission, Judge0 writes a `run_script` to the sandbox directory. The security issue is that an attacker can create a symbolic link (symlink) at the path `run_script` before this code is executed, resulting in the `f.write` writing to an arbitrary file on the unsandboxed system. An attacker can leverage this vulnerability to overwrite scripts on the system and gain code execution outside of the sandbox.

NVD (es)

Judge0 es un sistema de ejecución de código en línea de código abierto. La aplicación no tiene en cuenta los enlaces simbólicos colocados dentro del directorio de la zona de pruebas, que un atacante puede aprovechar para escribir en archivos arbitrarios y obtener la ejecución de código fuera de la zona de pruebas. Al ejecutar un envío, Judge0 escribe un `run_script` en el directorio sandbox. El problema de seguridad es que un atacante puede crear un enlace simbólico (enlace simbólico) en la ruta `run_script` antes de que se ejecute este código, lo que da como resultado que `f.write` escriba en un archivo arbitrario en el sistema sin espacio aislado. Un atacante puede aprovechar esta vulnerabilidad para sobrescribir scripts en el sistema y obtener la ejecución del código fuera del entorno limitado.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-28185 changed 2024-08-02CVE Terms of Use
NVDCVE-2024-28185 changed 2026-06-17Public domain