Vulnerabilities in pkg:nuget/Tgstation.Server.Api
PACKAGECVE-2024-41799 is a HIGH (CVSS 8.4) tgstation-server's dreammaker environment files outside vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Tgstation.Server.Api libraries in the NuGet ecosystem. The issue involves tgstation-server's dreammaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users. Remediation is available by upgrading affected packages to version 6.8.0.
pkg:nuget/Tgstation.Server.Api
Vulnerability advisories affecting package pkg:nuget/Tgstation.Server.Api. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-c3h4-9gc2-f7h4 | CVE-2024-41799 | HIGH | tgstation-server's DreamMaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users |
CVE-2024-41799 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:H).
How to Fix CVE-2024-41799
To remediate this vulnerability, upgrade all affected Tgstation.Server.Api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Tgstation.Server.Api to 6.8.0
Upgrade Tgstation.Server.Host to 6.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Tgstation.Server.Api
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-41799, inspect your project dependencies for Tgstation.Server.Api:
inspect dependencies for Tgstation.Server.Api
Analyze the terminal output to locate any version of Tgstation.Server.Api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.8.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Tgstation.Server.Api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-41799 Affected Tgstation.Server.Api Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Tgstation.Server.Api
|
NuGet |
≥ 4.0.0
< 6.8.0
|
6.8.0
|
|
Tgstation.Server.Host
|
NuGet |
≥ 4.0.0
< 6.8.0
|
6.8.0
|
References
Frequently Asked Questions
What is CVE-2024-41799?
Which Tgstation.Server.Api versions are affected?
What version fixes CVE-2024-41799?
Is Tgstation.Server.Api affected?
Is Tgstation.Server.Host affected?
What is the CVSS score of CVE-2024-41799?
What CWE is associated with CVE-2024-41799?
How can I check NuGet dependencies for CVE-2024-41799?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c3h4-9gc2-f7h4",
"modified" : "2024-07-29T16:44:15Z",
"published" : "2024-07-29T16:44:15Z",
"aliases" : [ "CVE-2024-41799" ],
"summary" : "tgstation-server's DreamMaker environment files outside the deployment directory can be compiled and ran by insufficiently permissioned users",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nLow permission users using the \"Set .dme Path\" privilege could potentially set malicious .dme files existing on the host machine to be compiled and executed. \n\nThese .dme files could be uploaded via tgstation-server (requiring a separate, isolated privilege) or some other means.\n\nA 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.\n\nThe 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.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nThis problem is patched by pull request #1835 and fixed in versions 6.8.0 and above.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nDo not give un-trusted users the Deployment permission to set a .dme path on instances.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Tgstation.Server.Api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "6.8.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Tgstation.Server.Host"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "6.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tgstation/tgstation-server/security/advisories/GHSA-c3h4-9gc2-f7h4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41799"
}, {
"type" : "WEB",
"url" : "https://github.com/tgstation/tgstation-server/pull/1835"
}, {
"type" : "WEB",
"url" : "https://github.com/tgstation/tgstation-server/commit/374852fe5ae306415eb5aafb2d16b06897d7afe4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tgstation/tgstation-server"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-29T16:44:15Z",
"nvd_published_at" : "2024-07-29T15:15:16Z"
}
}