Skip to content

Symlink LFI in Dojo repos

High
zardus published GHSA-fcq8-jqq5-9xmh Jan 30, 2025

Package

pwn.college DOJO

Affected versions

<= 1f0b1f22c971edd5d883632fb2346d9c6f8b8535

Patched versions

None

Description

Summary

Incorrect symlink checks on user specified dojos allows for users (admin not required) to perform an LFI from the CTFd container.

Details

When a user clones or updates repositories, a check is performed to see if the repository had contained any symlinks. A malicious user could craft a repository with symlinks pointed to sensitive files and then retrieve them using the CTFd website.

PoC

Start from an empty directory.

  1. $ git init
  2. Create a dojo.yml file (https://github.com/pwncollege/example-dojo/blob/main/dojo.yml works fine but I removed the modules)
  3. $ ln -s /etc/passwd DESCRIPTION.md
    NOTE: In the above step, /etc/passwd can be replaced with any file of your choosing
  4. Commit and push the dojo.yml and DESCRIPTION.md to a GitHub repo
  5. Create a dojo from that GitHub repo
  6. Navigate to the main page of the new dojo
  7. See file contents

Impact

This is an LFI where the server secrets and other sensitive files could be exposed.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

CVE ID

CVE-2025-24886

Credits