Skip to content
Path traversal Advisory Intermediate CVE-2024-51499CVE-2024-51743CVE-2024-47820

GHSL-2024-060_GHSL-2024-068: Several vulnerabilities in MarkUs - CVE-2024-51499, CVE-2024-51743, CVE-2024-47820

Several file write and path traversal vulnerabilities in MarkUs allowed authenticated users to write arbitrary files or read arbitrary files on the server. Writing a Ruby file to the initializers directory could lead to remote code execution after a restart.

p Follow

Originally disclosed on GitHub Security Lab

Several vulnerabilities were found in MarkUs, a web application for the submission and grading of student assignments. They can lead up to Remote Code Execution (RCE) via the submission of a student.

p-, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application joined user-supplied path parameters with internal paths without proper validation, allowing directory traversal.

Impact

This issue may lead up to Remote Code Execution (RCE) via arbitrary file write.

What the attacker needed

A valid account (student or instructor); ability to upload files; application restart for RCE

How it was found

  1. Log in as a student or instructor with permission to upload files.
  2. Send a request to the update_files endpoint with a path parameter containing directory traversal sequences.
  3. Include a file with Ruby code to be written to the initializers directory.
  4. Wait for the application to restart or force a restart.
  5. Observe the code execution in the logs.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

MarkUs is a web app for submitting and grading student work. Some parts of it let users upload files, but the app didn't check where those files were saved. An attacker with a normal account could save a file anywhere on the server, including a special folder that runs code when the app restarts, leading to full control of the server.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by p

View all

49 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.