Miggo Logo

CVE-2025-49132: Pterodactyl Panel Unauthenticated Remote Code Execution Vulnerability

10

CVSS Score
3.1

Basic Information

EPSS Score
0.95728%
Published
6/19/2025
Updated
6/20/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
pterodactyl/panelcomposer<= 1.11.101.11.11

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in the __invoke method of the Pterodactyl\Http\Controllers\Base\LocaleController class. This method is responsible for handling requests to the /locales/locale.json endpoint. The vulnerability is a path traversal issue, where the locale and namespace GET parameters are not properly sanitized before being used to construct a file path that is passed to the load method of the translation loader.

The vulnerable code allowed for multiple locales and namespaces to be processed, and it replaced dots with slashes in the namespace. This could be exploited by an attacker to traverse the directory structure and include arbitrary files. For example, an attacker could craft a request with a namespace like ../../../../../../etc/passwd to read that file.

The patch addresses this vulnerability by introducing a new Form Request class, Pterodactyl\Http\Requests\Base\LocaleRequest, which enforces strict validation rules on the locale and namespace parameters. The validation ensures that locale is exactly two lowercase letters and namespace is a simple string of lowercase letters. This prevents any path traversal or other malicious characters from being passed to the file loading mechanism. The controller's __invoke method is updated to use this new request class, thus ensuring that the input is validated before being used.

Vulnerable functions

Pterodactyl\Http\Controllers\Base\LocaleController::__invoke
app/Http/Controllers/Base/LocaleController.php
The `__invoke` method in `LocaleController` was vulnerable because it used unsanitized user input from the `locale` and `namespace` query parameters to construct a file path for loading translation files. An attacker could provide malicious input containing path traversal sequences (e.g., `../`) to cause the application to load arbitrary files from the server's filesystem. This could lead to disclosure of sensitive information or remote code execution if a file containing executable code is loaded.

WAF Protection Rules

WAF Rule

## Imp**t Usin* t** `/lo**l*s/lo**l*.json` wit* t** `lo**l*` *n* `n*m*sp***` qu*ry p*r*m*t*rs, * m*li*ious **tor is **l* to *x**ut* *r*itr*ry *o**, wit*out **in* *ut**nti**t**. Wit* t** **ility to *x**ut* *r*itr*ry *o**, t*is vuln*r**ility **n ** *

Reasoning

T** vuln*r**ility *xists in t** `__invok*` m*t*o* o* t** `Pt*ro***tyl\*ttp\*ontroll*rs\**s*\Lo**l**ontroll*r` *l*ss. T*is m*t*o* is r*sponsi*l* *or **n*lin* r*qu*sts to t** `/lo**l*s/lo**l*.json` *n*point. T** vuln*r**ility is * p*t* tr*v*rs*l issu*,