GHSA-7v3x-h7r2-34jv: Pterodactyl/panel Insufficient Session Expiration Vulnerability

MODERATE
CVSS 6.0
CWE-613
Published
Advisory Summary

GHSA-7v3x-h7r2-34jv is a MODERATE (CVSS 6.0) insufficient session expiration vulnerability (CWE-613: Insufficient Session Expiration) affecting Pterodactyl/panel libraries in the Packagist ecosystem. The issue involves insufficient session expiration in pterodactyl api. Remediation is available by upgrading affected packages to version 1.7.0.

GHSA-7v3x-h7r2-34jv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7v3x-h7r2-34jv
Severity MODERATE
CVSS v3.1 Base Score 6.0
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Pterodactyl/panel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.0

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

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

How to Fix GHSA-7v3x-h7r2-34jv

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

pterodactyl/panel fixed: 1.7.0
Upgrade pterodactyl/panel to 1.7.0
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 pterodactyl/panel

How to Check if You Are Affected

To determine whether your application is affected by GHSA-7v3x-h7r2-34jv, inspect your project dependencies for Pterodactyl/panel:

inspect dependencies for pterodactyl/panel

Analyze the terminal output to locate any version of Pterodactyl/panel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Pterodactyl/panel, 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 A vulnerability exists in Pterodactyl Panel `<= 1.6.6` that could allow a malicious attacker that compromises an API key to generate an authenticated user session that is not revoked when the API key is deleted, thus allowing the malicious user to remain logged in as the user the key belonged to. It is important to note that **a malicious user must first compromise an existing API key for a user to exploit this issue**. It cannot be exploited by chance, and requires a coordinated attack against an individual account using a known API key. ### Patches This issue has been addressed in the `v1.7.0` release of Pterodactyl Panel. ### Workarounds Those not wishing to upgrade may apply the change below: ```diff diff --git a/app/Http/Middleware/Api/AuthenticateKey.php b/app/Http/Middleware/Api/AuthenticateKey.php index eb25dac6..857bfab2 100644 --- a/app/Http/Middleware/Api/AuthenticateKey.php +++ b/app/Http/Middleware/Api/AuthenticateKey.php @@ -70,7 +70,7 @@ class AuthenticateKey } else { $model = $this->authenticateApiKey($request->bearerToken(), $keyType); - $this->auth->guard()->loginUsingId($model->user_id); + $this->auth->guard()->onceUsingId($model->user_id); } ``` ### For more information If you have any questions or comments about this advisory please reach out to `Tactical Fish#8008` on [Discord](https://discord.gg/pterodactyl) or email `dane@pterodactyl.io`.

GHSA-7v3x-h7r2-34jv Affected Pterodactyl/panel Versions

1 component(s)
Fixed Versions:
1.7.0
Product / Package Ecosystem Affected Versions Fixed Version
pterodactyl/panel
Packagist
< 1.7.0
1.7.0

References

Frequently Asked Questions

What is GHSA-7v3x-h7r2-34jv?
GHSA-7v3x-h7r2-34jv is a security vulnerability in Pterodactyl/panel involving Insufficient Session Expiration in Pterodactyl API under CWE-613: Insufficient Session Expiration.
Which Pterodactyl/panel versions are affected?
Affected versions include releases prior to 1.7.0 across affected packages: pterodactyl/panel.
What version fixes GHSA-7v3x-h7r2-34jv?
Upgrading to 1.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pterodactyl/panel affected?
Yes, pterodactyl/panel is affected in releases prior to 1.7.0. Upgrade your dependency to 1.7.0 or later.
What is the CVSS score of GHSA-7v3x-h7r2-34jv?
GHSA-7v3x-h7r2-34jv has a CVSS v3.1 base score of 6.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:L.
What CWE is associated with GHSA-7v3x-h7r2-34jv?
GHSA-7v3x-h7r2-34jv is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Packagist dependencies for GHSA-7v3x-h7r2-34jv?
Run the dependency tree command: 'inspect dependencies for pterodactyl/panel'. 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-7v3x-h7r2-34jv",
  "modified" : "2022-01-20T16:18:28Z",
  "published" : "2022-01-21T18:43:05Z",
  "aliases" : [ ],
  "summary" : "Insufficient Session Expiration in Pterodactyl API",
  "details" : "### Impact\nA vulnerability exists in Pterodactyl Panel `<= 1.6.6` that could allow a malicious attacker that compromises an API key to generate an authenticated user session that is not revoked when the API key is deleted, thus allowing the malicious user to remain logged in as the user the key belonged to.\n\nIt is important to note that **a malicious user must first compromise an existing API key for a user to exploit this issue**. It cannot be exploited by chance, and requires a coordinated attack against an individual account using a known API key.\n\n### Patches\nThis issue has been addressed in the `v1.7.0` release of Pterodactyl Panel.\n\n### Workarounds\nThose not wishing to upgrade may apply the change below:\n\n```diff\ndiff --git a/app/Http/Middleware/Api/AuthenticateKey.php b/app/Http/Middleware/Api/AuthenticateKey.php\nindex eb25dac6..857bfab2 100644\n--- a/app/Http/Middleware/Api/AuthenticateKey.php\n+++ b/app/Http/Middleware/Api/AuthenticateKey.php\n@@ -70,7 +70,7 @@ class AuthenticateKey\n         } else {\n             $model = $this->authenticateApiKey($request->bearerToken(), $keyType);\n\n-            $this->auth->guard()->loginUsingId($model->user_id);\n+            $this->auth->guard()->onceUsingId($model->user_id);\n         }\n```\n\n### For more information\nIf you have any questions or comments about this advisory please reach out to `Tactical Fish#8008` on [Discord](https://discord.gg/pterodactyl) or email `dane@pterodactyl.io`.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pterodactyl/panel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/panel/security/advisories/GHSA-7v3x-h7r2-34jv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/panel/commit/dfa329ddf242908b60e22e3340ea36359eab1ef4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pterodactyl/panel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pterodactyl/panel/releases/tag/v1.7.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-20T16:18:28Z",
    "nvd_published_at" : null
  }
}