GHSA-c3h4-9gc2-f7h4

Suggest an improvement
Source
https://github.com/advisories/GHSA-c3h4-9gc2-f7h4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-c3h4-9gc2-f7h4/GHSA-c3h4-9gc2-f7h4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c3h4-9gc2-f7h4
Aliases
Published
2024-07-29T16:44:15Z
Modified
2024-07-29T17:11:57.632442Z
Severity
  • 8.4 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:H CVSS Calculator
  • 7.3 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:H/SC:H/SI:L/SA:H CVSS Calculator
Summary
tgstation-server's DreamMaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users
Details

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.

References

Affected packages

NuGet / Tgstation.Server.Api

Package

Name
Tgstation.Server.Api
View open source insights on deps.dev
Purl
pkg:nuget/Tgstation.Server.Api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.0.0
Fixed
6.8.0

Affected versions

4.*

4.0.0
4.0.2

6.*

6.1.0
6.2.0
6.3.0
6.4.0
6.4.1
6.5.0
6.5.1
6.6.0

NuGet / Tgstation.Server.Host

Package

Name
Tgstation.Server.Host
View open source insights on deps.dev
Purl
pkg:nuget/Tgstation.Server.Host

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.0.0
Fixed
6.8.0