CVE-2024-28185CWE-59CWE-61

Judge0 vulnerable to Sandbox Escape via Symbolic Link

Critical · published April 18, 2024

CVSS v3.1
10.0
EPSS
7%
Percentile
94.2
In the wild
Unconfirmed
What it is

🚨 A sneaky symbolic link could turn your code execution system into a free-for-all! This flaw in Judge0 lets an attacker write to arbitrary files in the unsandboxed system. 🔥 Think of the sandbox as a fenced garden where only specific activities are allowed. Now, if someone snuck in a cleverly disguised tunnel (symlink), they could access all the beautiful flowers outside the garden—suddenly, the fence means nothing. An attacker could overwrite critical scripts on the server, leading to unauthorized code execution beyond the sandboxed environment. This breach could compromise the entire system, allowing attackers to wreak havoc, steal sensitive data, or spread malware—absolutely devastating!

Put simply

Think of the sandbox as a fenced garden where only specific activities are allowed. Now, if someone snuck in a cleverly disguised tunnel (symlink), they could access all the beautiful flowers outside the garden—suddenly, the fence means nothing. This vulnerability arises from Judge0's failure to prevent symlink creation in its sandbox directory. By creating a symlink at the `run_script` path, attackers can redirect file writes to arbitrary locations on the filesystem, escaping the intended sandbox restrictions.

What to do

An attacker could overwrite critical scripts on the server, leading to unauthorized code execution beyond the sandboxed environment. This breach could compromise the entire system, allowing attackers to wreak havoc, steal sensitive data, or spread malware—absolutely devastating! Update Judge0 to the latest version immediately to resolve this vulnerability. Additionally, review your code execution environment to ensure symlink protections are in place and consider implementing stricter checks on file paths. 🛡️ You've got this! By following these steps, you’ll not only patch the vulnerability but also enhance your security posture! 💪🦸

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.07057 · 94.2th percentile
Weaknesses
CWE-59 · Improper Link Resolution Before File Access ('Link Following'); CWE-61 · UNIX Symbolic Link (Symlink) Following
Published
2024-04-18T14:31Z
EPSS history
Timeline
  • 18 APR 14:31Z
    Judge0 vulnerable to Sandbox Escape via Symbolic Link
    cvelistv5