CVE-2023-25168: Github.com/pterodactyl/wings Pterodactyl Wings Contains UNIX Symbolic Vulnerability

CRITICAL
Advisory Identifier: GHSA-66p8-j459-rq63
CVSS 9.6
CWE-59
Published
Advisory Summary

CVE-2023-25168 is a CRITICAL (CVSS 9.6) pterodactyl wings contains unix symbolic vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/pterodactyl/wings libraries in the Go ecosystem. The issue involves pterodactyl wings contains unix symbolic link (symlink) following resulting in deletion of files and directories on the host system. Remediation is available by upgrading affected packages to version 1.7.4, 1.11.4.

CVE-2023-25168 at a Glance

CVE Identifier CVE-2023-25168
GHSA Identifier GHSA-66p8-j459-rq63
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Github.com/pterodactyl/wings
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-25168

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

github.com/pterodactyl/wings fixed: 1.7.4
Upgrade github.com/pterodactyl/wings to 1.7.4
github.com/pterodactyl/wings fixed: 1.11.4
Upgrade github.com/pterodactyl/wings to 1.11.4
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 github.com/pterodactyl/wings

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-25168, inspect your project dependencies for Github.com/pterodactyl/wings:

inspect dependencies for github.com/pterodactyl/wings

Analyze the terminal output to locate any version of Github.com/pterodactyl/wings in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.4), 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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Github.com/pterodactyl/wings, 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

### Impact This vulnerability impacts anyone running the affected versions of Wings. The vulnerability can be used to delete files and directories recursively on the host system. This vulnerability can be combined with [`GHSA-p8r3-83r8-jwj5`](https://github.com/pterodactyl/wings/security/advisories/GHSA-p8r3-83r8-jwj5) to overwrite files on the host system. In order to use this exploit, an attacker must have an existing "server" allocated and controlled by Wings. Information on how the exploitation of this vulnerability works will be released on February 24th, 2023 in North America. ### Patches This vulnerability has been resolved in version `v1.11.4` of Wings, and has been back-ported to the 1.7 release series in `v1.7.4`. Anyone running `v1.11.x` should upgrade to `v1.11.4` and anyone running `v1.7.x` should upgrade to `v1.7.4`. ### Workarounds None at this time.

CVE-2023-25168 Affected Github.com/pterodactyl/wings Versions

2 component(s)
Fixed Versions:
1.7.41.11.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/pterodactyl/wings
Go
< 1.7.4
1.7.4
github.com/pterodactyl/wings
Go
≥ 1.11.0
< 1.11.4
1.11.4

References

Frequently Asked Questions

What is CVE-2023-25168?
CVE-2023-25168 is a security vulnerability in Github.com/pterodactyl/wings involving Pterodactyl Wings contains UNIX Symbolic Link (Symlink) Following resulting in deletion of files and directories on the host system under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Github.com/pterodactyl/wings versions are affected?
Affected versions include releases prior to 1.7.4, 1.11.4 across affected packages: github.com/pterodactyl/wings.
What version fixes CVE-2023-25168?
Upgrading to 1.7.4, 1.11.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/pterodactyl/wings affected?
Yes, github.com/pterodactyl/wings is affected in releases prior to 1.7.4, 1.11.4. Upgrade your dependency to 1.7.4, 1.11.4 or later.
What is the CVSS score of CVE-2023-25168?
CVE-2023-25168 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H.
What CWE is associated with CVE-2023-25168?
CVE-2023-25168 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check Go dependencies for CVE-2023-25168?
Run the dependency tree command: 'inspect dependencies for github.com/pterodactyl/wings'. 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-66p8-j459-rq63",
  "modified" : "2023-02-10T23:11:01Z",
  "published" : "2023-02-10T23:11:01Z",
  "aliases" : [ "CVE-2023-25168" ],
  "summary" : "Pterodactyl Wings contains UNIX Symbolic Link (Symlink) Following resulting in deletion of files and directories on the host system",
  "details" : "### Impact\n\nThis vulnerability impacts anyone running the affected versions of Wings.  The vulnerability can be used to delete files and directories recursively on the host system.  This vulnerability can be combined with [`GHSA-p8r3-83r8-jwj5`](https://github.com/pterodactyl/wings/security/advisories/GHSA-p8r3-83r8-jwj5) to overwrite files on the host system.\n\nIn order to use this exploit, an attacker must have an existing \"server\" allocated and controlled by Wings.  Information on how the exploitation of this vulnerability works will be released on February 24th, 2023 in North America.\n\n### Patches\n\nThis vulnerability has been resolved in version `v1.11.4` of Wings, and has been back-ported to the 1.7 release series in `v1.7.4`.\n\nAnyone running `v1.11.x` should upgrade to `v1.11.4` and anyone running `v1.7.x` should upgrade to `v1.7.4`.\n\n### Workarounds\n\nNone at this time.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/pterodactyl/wings"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/pterodactyl/wings"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.0"
      }, {
        "fixed" : "1.11.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/wings/security/advisories/GHSA-66p8-j459-rq63"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/wings/security/advisories/GHSA-p8r3-83r8-jwj5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25168"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/wings/commit/429ac62dba22997a278bc709df5ac00a5a25d83d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pterodactyl/wings"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-10T23:11:01Z",
    "nvd_published_at" : "2023-02-09T00:16:00Z"
  }
}