Skip to content
RCE Write-up Advanced

Multiple Vulnerabilities in Frappe LMS Leading to Remote Code Execution

Frappe LMS had a path traversal in SCORM package upload that let a course creator write files outside the intended directory, and a stored XSS in the profile bio that let any student inject script. Chained, a student could execute code on the server when an administrator viewed the malicious profile.

Nicholas Hefty Follow

Published on rhinosecuritylabs.com

Frappe LMS is an open-source learning management system built on the Frappe framework. It provides organizations with tools to create and manage online courses, track student progress, post job opportunities, and run learning batches.

Nicholas Hefty, on rhinosecuritylabs.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the chapter title was used unsanitised in a file path, and the profile preview rendered text from BeautifulSoup's get_text() without re-sanitising it.

What the attacker needed

Course creator or admin for path traversal; student account for XSS; admin views malicious profile

The fix

The vulnerabilities were fixed in version v2.50.1.

How it was found

  1. Create a malicious SCORM package containing a backdoored api.py file.
  2. Upload the package in the 'Add Chapter' dialog and set the chapter name to a traversal path.
  3. The api.py file is replaced with the backdoored version despite a 500 error.
  4. Log in as a student, edit the profile bio with an XSS payload, and save.
  5. When an administrator views the profile, the script runs and can execute commands on the server.

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 write-up has not been written yet. The Original tab links to the source.

A path traversal bug lets someone use '..' in a file name to save files outside the intended folder, here overwriting application code. A stored XSS bug lets a user save a script that runs in other users' browsers. Together, a low-privilege student could trick an admin into running code on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.