Skip to main content

GHSA-hvm9-wc8j-mgrc — Vulnerability in TShock — Advisory Details

HIGH

TShock Security Escalation Exploit

Published December 18, 2024Updated December 18, 2024Source: OSV

Does your project use an affected TShock version?

Paste your packages.lock.json to check it for GHSA-hvm9-wc8j-mgrc and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my packages.lock.json

Summary

Impact

An issue with the way OTAPI manages client connections results in stale UUIDs remaining on RemoteClient instances after a player disconnects.

Because of this, if the following conditions are met a player may assume the login state of a previously connected player:

  1. The server has UUID login enabled
  2. An authenticated player disconnects
  3. A subsequent player connects with a modified client that does not send the ClientUUID#68 packet during connection
  4. The server assigns the same RemoteClient object that belonged to the originally authenticated player to the newly connected player

Patches

TShock 5.2.1 hotfixes this issue. A more robust fix will be made to OTAPI itself.

Workarounds

Implement a RemoteClient reset event handler in a plugin like so:

public override void Initialize()
{
        On.Terraria.RemoteClient.Reset += RemoteClient_Reset;
}

private static void RemoteClient_Reset(On.Terraria.RemoteClient.orig_Reset orig, RemoteClient client)
{
	client.ClientUUID = null;
        orig(client);
}

Advisory Timeline

  • First published December 18, 2024 (708 days ago).
  • Last revised December 18, 2024 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update TShock to 5.2.1 or later
dotnet add package TShock --version 5.2.1

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: NuGet (1).

PackageFixed In
TShock NuGet · Affected: 5.0.0, 5.0.0-beta, 5.1.0, 5.1.1 (+3 more)5.2.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:L/SI:H/SA:H

Frequently Asked Questions

What is GHSA-hvm9-wc8j-mgrc?
TShock Security Escalation Exploit. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.2/10).
How do I check if my project is affected by GHSA-hvm9-wc8j-mgrc?
GHSA-hvm9-wc8j-mgrc affects TShock. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-hvm9-wc8j-mgrc and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.2

Maximum impact if exploited, often with little effort or access required.

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json