CVE-2024-41799 tgstation-server's DreamMaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users

High 8.4 Published Updated

Low-privilege users can compile and execute malicious files outside the deployment directory, potentially leading to remote code execution if trusted security levels are enabled.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-41799?

CVE-2024-41799 is a high-severity path traversal vulnerability in tgstation-server, published on 29 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

tgstation-server is a production scale tool for BYOND server management. Prior to 6.8.0, low permission users using the "Set .dme Path" privilege could potentially set malicious .dme files existing on the host machine to be compiled and executed. These .dme files could be uploaded via tgstation-server (requiring a separate, isolated privilege) or some other means. A server configured to execute in BYOND's trusted security level (requiring a third separate, isolated privilege OR being set by another user) could lead to this escalating into remote code execution via BYOND's shell() proc. The ability to execute this kind of attack is a known side effect of having privileged TGS users, but normally requires multiple privileges with known weaknesses. This vector is not intentional as it does not require control over the where deployment code is sourced from and _may_ not require remote write access to an instance's `Configuration` directory. This problem is fixed in versions 6.8.0 and above.

Weakness: CWE-22

Which versions are affected by CVE-2024-41799?

4 open source packages ship an affected version, including Tgstation.Server.Api and Tgstation.Server.Host. It affects 1 product.

PackageAffectedFixed in
Tgstation.Server.Api NuGetFrom 4.0.06.8.0
Tgstation.Server.Api NuGetFrom 4.0.06.8.0
Tgstation.Server.Host NuGetFrom 4.0.06.8.0
Tgstation.Server.Host NuGetFrom 4.0.06.8.0

Products include Tgstation13 Tgstation-Server.

How do I fix CVE-2024-41799?

Upgrade Tgstation.Server.Api to 6.8.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-41799 being exploited?

There is no known exploitation of CVE-2024-41799 in the wild and no public exploit code.

Sources

Also known as GHSA-c3h4-9gc2-f7h4.

Is CVE-2024-41799 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free