{"answers":{"affected":"2 open source packages ship an affected version, including pterodactyl/panel.","exploited":"There is no known exploitation of GHSA-7v3x-h7r2-34jv in the wild and no public exploit code.","fix":"Upgrade pterodactyl/panel to 1.7.0 or later.","what":"GHSA-7v3x-h7r2-34jv is a vulnerability in pterodactyl/panel, published on 21 Jan 2022."},"fix_prompt":"Check this codebase for GHSA-7v3x-h7r2-34jv and fix it if it is affected.\n\nWhat it is: GHSA-7v3x-h7r2-34jv is a vulnerability in pterodactyl/panel, published on 21 Jan 2022. \nExploitation: There is no known exploitation of GHSA-7v3x-h7r2-34jv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pterodactyl/panel (Packagist): affected all versions; fixed in 1.7.0\n- pterodactyl/panel (Packagist): affected all versions; fixed in 1.7.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-7v3x-h7r2-34jv/ (Markdown: https://insights.sbomify.com/GHSA-7v3x-h7r2-34jv/index.md)","id":"GHSA-7v3x-h7r2-34jv","markdown":"https://insights.sbomify.com/GHSA-7v3x-h7r2-34jv/index.md","name":"GHSA-7v3x-h7r2-34jv","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nA vulnerability exists in Pterodactyl Panel `\u003c= 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-\u003eauthenticateApiKey($request-\u003ebearerToken(), $keyType);\n\n-            $this-\u003eauth-\u003eguard()-\u003eloginUsingId($model-\u003euser_id);\n+            $this-\u003eauth-\u003eguard()-\u003eonceUsingId($model-\u003euser_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`.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Insufficient Session Expiration in Pterodactyl API","id":"GHSA-7v3x-h7r2-34jv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":null,"year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["1.7.0"],"introduced":["0"],"last_affected":[],"package":"pterodactyl/panel","purl":null,"source":"GHSA-7v3x-h7r2-34jv"},{"ecosystem":"Packagist","fixed":["1.7.0"],"introduced":["0"],"last_affected":[],"package":"pterodactyl/panel","purl":"pkg:composer/pterodactyl/panel","source":"GHSA-7v3x-h7r2-34jv"}],"products":null,"published":"2022-01-21","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/GHSA-7v3x-h7r2-34jv/"}