GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-8r6w-3qq5-4p4rhigh8.1

Pterodactyl's improper JWT scoping allows subuser to upload files when not explicitly granted `file.create` permissions

Check your stack

The advisory, in context

Summary

A privilege escalation vulnerability exists in the Wings /upload/file endpoint due to insufficient validation of panel-signed JWTs. Wings accepts any valid panel-signed JWT containing server_uuid, user_uuid, and unique_id, regardless of the token’s intended purpose. Because the Panel issues JWTs with these same claims for other lower-privilege operations (such as WebSocket authentication and file download links), an authenticated subuser can reuse one of those tokens to upload arbitrary files without possessing the required file.create permission.

Impact

Any subuser with permission to connect to a server's console, download files, or download backups could reuse those tokens to upload arbitrary files to the same server. A user that does not have access to a server as a subuser is not able to arbitrarily upload files.

Details

The panel generated JWT tokens for various purposes:

PoC

Create a new subuser that has the minimal amount of permissions on a server (websocket.connect). As that subuser, retrieve a websocket JWT token from the GET /api/client/servers/[...]/websocket endpoint (in my case, I manually just make a request under that user's browser session; you can probably just resend the /websocket request in browser console to get a fresh unused token). Using that websocket token, we can abuse this by directly using it in the /upload/file endpoint of the wings node instead of using it for websocket authentication:

import requests

wings_url = 'http://[...]:8080'
websocket_token = '[...]'

res = requests.post(f'{wings_url}/upload/file', params = {
    'token': websocket_token,
}, files = {
    'files': ('file-upload.txt', b'Hello, World!'),
})
print(res.status_code, res.content)

Observe, that even though our subuser never has permissions outside viewing the console, they are able to write arbitrary files in the server. This pattern happens in a lot of other action, but this is probably the most interesting one.

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

Earlier releases before 1.12.3

Fixed in 1.12.3

121 explicitly affected versions

v0.1.0-beta, v0.1.1-beta, v0.1.2-beta, v0.2.0-beta, v0.3.0-beta, v0.4.0-beta, v0.4.1-beta, v0.5.0, v0.5.0-rc.1, v0.5.0-rc.2, v0.5.1, v0.5.2, v0.5.3, v0.5.4, v0.5.5, v0.5.6, v0.5.7, v0.6.0, v0.6.0-beta.1, v0.6.0-beta.2, v0.6.0-beta.2.1, v0.6.0-rc.1, v0.6.1, v0.6.2, v0.6.3, v0.6.4, v0.7.0, v0.7.0-beta.1, v0.7.0-beta.2, v0.7.0-beta.3, v0.7.0-beta.4, v0.7.0-rc.1, v0.7.0-rc.2, v0.7.1, v0.7.10, v0.7.11, v0.7.12, v0.7.13, v0.7.14, v0.7.15, v0.7.16, v0.7.17, v0.7.18, v0.7.19, v0.7.2, v0.7.3, v0.7.4, v0.7.5, v0.7.6, v0.7.7, v0.7.8, v0.7.9, v0.8.0-alpha.1, v0.8.0-alpha.2, v1.0.0, v1.0.0-beta.1, v1.0.0-beta.2, v1.0.0-beta.3, v1.0.0-beta.4, v1.0.0-beta.5, v1.0.0-beta.6, v1.0.0-beta.7, v1.0.0-rc.1, v1.0.0-rc.2, v1.0.0-rc.3, v1.0.0-rc.4, v1.0.0-rc.5, v1.0.0-rc.6, v1.0.0-rc.7, v1.0.1, v1.0.2, v1.0.3, v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.10.0, v1.10.1, v1.10.2, v1.10.3, v1.10.4, v1.11.0, v1.11.0-rc.1, v1.11.0-rc.2, v1.11.1, v1.11.10, v1.11.11, v1.11.2, v1.11.3, v1.11.4, v1.11.5, v1.11.6, v1.11.7, v1.11.8, v1.11.9, v1.12.0, v1.12.1, v1.12.2, v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.3.1, v1.3.2, v1.4.0, v1.4.1, v1.4.2, v1.5.0, v1.5.1, v1.6.0, v1.6.1, v1.6.2, v1.6.3, v1.6.5, v1.6.6, v1.7.0, v1.8.0, v1.8.1, v1.9.0, v1.9.1, v1.9.2

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "1.12.3"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "v0.1.0-beta",
    "v0.1.1-beta",
    "v0.1.2-beta",
    "v0.2.0-beta",
    "v0.3.0-beta",
    "v0.4.0-beta",
    "v0.4.1-beta",
    "v0.5.0",
    "v0.5.0-rc.1",
    "v0.5.0-rc.2",
    "v0.5.1",
    "v0.5.2",
    "v0.5.3",
    "v0.5.4",
    "v0.5.5",
    "v0.5.6",
    "v0.5.7",
    "v0.6.0",
    "v0.6.0-beta.1",
    "v0.6.0-beta.2",
    "v0.6.0-beta.2.1",
    "v0.6.0-rc.1",
    "v0.6.1",
    "v0.6.2",
    "v0.6.3",
    "v0.6.4",
    "v0.7.0",
    "v0.7.0-beta.1",
    "v0.7.0-beta.2",
    "v0.7.0-beta.3",
    "v0.7.0-beta.4",
    "v0.7.0-rc.1",
    "v0.7.0-rc.2",
    "v0.7.1",
    "v0.7.10",
    "v0.7.11",
    "v0.7.12",
    "v0.7.13",
    "v0.7.14",
    "v0.7.15",
    "v0.7.16",
    "v0.7.17",
    "v0.7.18",
    "v0.7.19",
    "v0.7.2",
    "v0.7.3",
    "v0.7.4",
    "v0.7.5",
    "v0.7.6",
    "v0.7.7",
    "v0.7.8",
    "v0.7.9",
    "v0.8.0-alpha.1",
    "v0.8.0-alpha.2",
    "v1.0.0",
    "v1.0.0-beta.1",
    "v1.0.0-beta.2",
    "v1.0.0-beta.3",
    "v1.0.0-beta.4",
    "v1.0.0-beta.5",
    "v1.0.0-beta.6",
    "v1.0.0-beta.7",
    "v1.0.0-rc.1",
    "v1.0.0-rc.2",
    "v1.0.0-rc.3",
    "v1.0.0-rc.4",
    "v1.0.0-rc.5",
    "v1.0.0-rc.6",
    "v1.0.0-rc.7",
    "v1.0.1",
    "v1.0.2",
    "v1.0.3",
    "v1.1.0",
    "v1.1.1",
    "v1.1.2",
    "v1.1.3",
    "v1.10.0",
    "v1.10.1",
    "v1.10.2",
    "v1.10.3",
    "v1.10.4",
    "v1.11.0",
    "v1.11.0-rc.1",
    "v1.11.0-rc.2",
    "v1.11.1",
    "v1.11.10",
    "v1.11.11",
    "v1.11.2",
    "v1.11.3",
    "v1.11.4",
    "v1.11.5",
    "v1.11.6",
    "v1.11.7",
    "v1.11.8",
    "v1.11.9",
    "v1.12.0",
    "v1.12.1",
    "v1.12.2",
    "v1.2.0",
    "v1.2.1",
    "v1.2.2",
    "v1.3.0",
    "v1.3.1",
    "v1.3.2",
    "v1.4.0",
    "v1.4.1",
    "v1.4.2",
    "v1.5.0",
    "v1.5.1",
    "v1.6.0",
    "v1.6.1",
    "v1.6.2",
    "v1.6.3",
    "v1.6.5",
    "v1.6.6",
    "v1.7.0",
    "v1.8.0",
    "v1.8.1",
    "v1.9.0",
    "v1.9.1",
    "v1.9.2"
  ]
}
Semantic versions

Earlier releases before 1.12.2

Fixed in 1.12.2

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "1.12.2"
        }
      ],
      "type": "SEMVER"
    }
  ],
  "versions": []
}

References