Skip to content

DreamMaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users

High
Cyberboss published GHSA-c3h4-9gc2-f7h4 Jul 27, 2024

Package

tgstation-server (GitHub Releases)

Affected versions

>=4.0.0,<6.8.0

Patched versions

>=6.8.0

Description

Impact

What kind of vulnerability is it? Who is impacted?

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.

Patches

Has the problem been patched? What versions should users upgrade to?

This problem is patched by pull request #1835 and fixed in versions 6.8.0 and above.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Do not give un-trusted users the Deployment permission to set a .dme path on instances.

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
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

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:H/PR:L/UI:N/S:C/C:H/I:H/A:H

CVE ID

CVE-2024-41799

Weaknesses

Credits