Link Following (Symlink)Weakness · CWE-59

CVE-2024-28185

CRITICAL · 10.0 CVSS v3.1 Published 2024-04-18
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Judge0 fails to check for pre-existing symlinks in the sandbox directory before writing the `run_script` file. An attacker can create a symlink at the `run_script` path before execution, causing the application to write to an arbitrary file on the host system when it follows the symlink, enabling privilege escalation and code execution outside the sandbox.

MitigationImplement symlink detection and prevention before file write operations - use O_NOFOLLOW flag, check for symlinks with os.path.islink(), or use atomic file creation with exclusive modes to prevent TOCTOU symlink attacks.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Judge0 installation and version
    Locate the Judge0 installation directory and determine the installed version by checking package.json, VERSION file, or git tags. Common paths include /opt/judge0 or /home/judge0.
    Affected if The installed version falls within the vulnerable range and has not been patched for symlink injection.
  2. Locate the sandbox directory and run_script path
    Find the sandbox directory configuration - typically defined in Judge0's configuration as SAAS_PATH or similar. Identify the exact path where run_script is written.
    Affected if The sandbox directory is writable by the Judge0 process and allows symlink creation.
  3. Check for pre-existing symlinks in sandbox directory
    List all files in the sandbox directory using 'ls -la' and look for any symlinks (indicated by 'l' prefix in permissions) that point to the run_script path or other sensitive locations outside the sandbox.
    Affected if A symlink exists at the run_script path or any location where Judge0 writes files, indicating potential exploitation.
  4. Verify write permissions on sandbox directory
    Check file permissions on the sandbox directory: 'ls -ld <sandbox_path>' and verify whether the Judge0 process user can create files or symlinks in this directory.
    Affected if The sandbox directory is owned by or writable by the Judge0 execution user, allowing symlink creation by an attacker.
  5. Inspect file write operations for symlink protection
    Review Judge0 source code or configuration for file write operations. Check if O_NOFOLLOW flag is used, os.path.islink() is called before writes, or atomic file creation with exclusive modes is implemented.
    Affected if The code lacks symlink detection mechanisms and writes files without checking if the target path is a symlink.

A user is affected if Judge0 is running an unpatched version, the sandbox directory allows symlink creation, and no symlink protection exists in the file write operations used for run_script.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Implement symlink detection and prevention before file write operations - use O_NOFOLLOW flag, check for symlinks with os.path.islink(), or use atomic file creation with exclusive modes to prevent TOCTOU symlink attacks.

Have this fixed Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing10.0 h
  • Review / QA6.0 h
34.0 hours of engineering $5,940
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $9,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-28185 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-28185 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data