CVE-2024-28185
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 · uneditedJudge0 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 confidenceJudge0 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Identify Judge0 installation and versionLocate 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.
-
Locate the sandbox directory and run_script pathFind 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.
-
Check for pre-existing symlinks in sandbox directoryList 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.
-
Verify write permissions on sandbox directoryCheck 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.
-
Inspect file write operations for symlink protectionReview 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.
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 dataImplement 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.
- Consultation6.0 h
- Implementation12.0 h
- Testing10.0 h
- Review / QA6.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-28185 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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