GHSA-7v3x-h7r2-34jv: Pterodactyl/panel Insufficient Session Expiration Vulnerability
MODERATEGHSA-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
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).
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.
Upgrade pterodactyl/panel to 1.7.0
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
GHSA-7v3x-h7r2-34jv Affected Pterodactyl/panel Versions
1 component(s)| 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?
Which Pterodactyl/panel versions are affected?
What version fixes GHSA-7v3x-h7r2-34jv?
Is pterodactyl/panel affected?
What is the CVSS score of GHSA-7v3x-h7r2-34jv?
What CWE is associated with GHSA-7v3x-h7r2-34jv?
How can I check Packagist dependencies for GHSA-7v3x-h7r2-34jv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}