Judge0 is an open-source online code execution system. The application uses the UNIX chown command on an untrusted file within the sandbox. An attacker can abuse this by creating a symbolic link (symlink) to a file outside the sandbox, allowing the attacker to run chown on arbitrary files outside of the sandbox. This vulnerability is not impactful on it's own, but it can be used to bypass the patch for CVE-2024-28185 and obtain a complete sandbox escape. This vulnerability is fixed in 1.13.1.
The application executes a UNIX chown system command on a file located within the sandbox, however without verifying its actual path. An attacker can place a symbolic link (symlink) at this location pointing to a file outside the sandbox. As a result, the chown command is executed on an arbitrary file in the host system. The vulnerability itself is part of an exploit chain — it serves to bypass the patch introduced for CVE-2024-28185 and enables complete sandbox escape.
An attacker can completely escape the Judge0 sandbox environment and gain unauthorized access to files and resources of the host system, which in practice leads to remote code execution (RCE) with high privileges.
Judge0 should be updated to version 1.13.1, in which the vulnerability has been fixed. The patch is available in the vendor's repository (commit f3b8547b3b67863e4ea0ded3adcb963add56addd).
Judge0 in versions prior to 1.13.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H