GHSA-f8mx-cwfh-7hr2: TShock TShock Allows Chat While Not Vulnerability

MODERATE
CWE-285
Published
Advisory Summary

GHSA-f8mx-cwfh-7hr2 is a MODERATE tshock allows chat while not vulnerability (CWE-285: Improper Authorization) affecting TShock libraries in the NuGet ecosystem. The issue involves tshock allows chat while not fully connected, possible ban evasion. Remediation is available by upgrading affected packages to version 5.2.2.

GHSA-f8mx-cwfh-7hr2 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-f8mx-cwfh-7hr2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product TShock
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix GHSA-f8mx-cwfh-7hr2

To remediate this vulnerability, upgrade all affected TShock dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

TShock fixed: 5.2.2
Upgrade TShock to 5.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for TShock

How to Check if You Are Affected

To determine whether your application is affected by GHSA-f8mx-cwfh-7hr2, inspect your project dependencies for TShock:

inspect dependencies for TShock

Analyze the terminal output to locate any version of TShock in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.2), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In TShock, 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

This issue was reported to TShock by @ohayo, but was found by the Discord user by the name of `sofurry.com`. Please note that this user **does not own this domain on the internet, just the discord handle**. TShock overrides certain Terraria vanilla systems, including chat, and the connection handling, for its own purposes, like enforcing bans. When clients connect but do not complete the connection handshake (e.g., send message number 6), they can "exist" on the server, occupy a player slot, chat, and receive data from the server despite not being fully connected. Individuals who exploit this will be able to effectively harass the server, observe the server, and utilize server resources even if banned from the server. For servers that operate with a proxy that strictly enforces the connection handshake/sequence, this is not an issue, but for smaller servers or servers running vanilla TShock this is an issue worth patching for. PR body supplied by @ohayo (patch writer): Terraria's standard server by default checks for bans upon the client sending the ConnectRequest packet, however, TShock instead chooses to check if the client connecting is banned upon the Request World Data packet. A malicious client can easily just not send this packet, and still join the server even while being banned. Also by not sending Request World Data, the malicious client is still able to receive all packets from the server & even chat. Other clients will not be notified of their join/leave but will be able to see them on the player list. Leading to potential chat spam & "spying" on packets of players within the server.

GHSA-f8mx-cwfh-7hr2 Affected TShock Versions

1 component(s)
Fixed Versions:
5.2.2
Product / Package Ecosystem Affected Versions Fixed Version
TShock
NuGet
< 5.2.2
5.2.2

References

Frequently Asked Questions

What is GHSA-f8mx-cwfh-7hr2?
GHSA-f8mx-cwfh-7hr2 is a security vulnerability in TShock involving TShock allows chat while not fully connected, possible ban evasion under CWE-285: Improper Authorization.
Which TShock versions are affected?
Affected versions include releases prior to 5.2.2 across affected packages: TShock.
What version fixes GHSA-f8mx-cwfh-7hr2?
Upgrading to 5.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is TShock affected?
Yes, TShock is affected in releases prior to 5.2.2. Upgrade your dependency to 5.2.2 or later.
What CWE is associated with GHSA-f8mx-cwfh-7hr2?
GHSA-f8mx-cwfh-7hr2 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check NuGet dependencies for GHSA-f8mx-cwfh-7hr2?
Run the dependency tree command: 'inspect dependencies for TShock'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f8mx-cwfh-7hr2",
  "modified" : "2025-02-03T16:02:56Z",
  "published" : "2025-02-03T16:02:36Z",
  "aliases" : [ ],
  "summary" : "TShock allows chat while not fully connected, possible ban evasion",
  "details" : "This issue was reported to TShock by @ohayo, but was found by the Discord user by the name of `sofurry.com`. Please note that this user **does not own this domain on the internet, just the discord handle**.\n\nTShock overrides certain Terraria vanilla systems, including chat, and the connection handling, for its own purposes, like enforcing bans. When clients connect but do not complete the connection handshake (e.g., send message number 6), they can \"exist\" on the server, occupy a player slot, chat, and receive data from the server despite not being fully connected. Individuals who exploit this will be able to effectively harass the server, observe the server, and utilize server resources even if banned from the server.\n\nFor servers that operate with a proxy that strictly enforces the connection handshake/sequence, this is not an issue, but for smaller servers or servers running vanilla TShock this is an issue worth patching for.\n\nPR body supplied by @ohayo (patch writer):\n\nTerraria's standard server by default checks for bans upon the client sending the ConnectRequest packet, however, TShock instead chooses to check if the client connecting is banned upon the Request World Data packet.\n\nA malicious client can easily just not send this packet, and still join the server even while being banned.\nAlso by not sending Request World Data, the malicious client is still able to receive all packets from the server & even chat. \n\nOther clients will not be notified of their join/leave but will be able to see them on the player list.\nLeading to potential chat spam & \"spying\" on packets of players within the server.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "TShock"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Pryaxis/TShock/security/advisories/GHSA-f8mx-cwfh-7hr2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Pryaxis/TShock/commit/134f80f5b8eac8929aa10f518c00970700d5913d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Pryaxis/TShock"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-03T16:02:36Z",
    "nvd_published_at" : null
  }
}