Alta

Pimcore Host Header Injection in user invitation link

  • Publicada: 20.02.2024
  • Actualizado: 11.10.2026 10:22

Overview

A potential security vulnerability discovered in pimcore/admin-ui-classic-bundle version up to v1.3.3 . The vulnerability involves a Host Header Injection in the invitationLinkAction function of the UserController, specifically in the way $loginUrl trusts user input.

Details

The host header from incoming HTTP requests is used unsafely when generating URLs. An attacker can manipulate the HTTP host header in requests to the /admin/user/invitationlink endpoint, resulting in the generation of URLs with the attacker's domain.

In fact, if a host header is injected in the POST request, the $loginURL parameter is constructed with this unvalidated host header. It is then used to send an invitation email to the provided user.

Here is an excerpt from the affected section of UserController.php file:

php
// /src/Controller/Admin/UserController.php 
    public function invitationLinkAction(Request $request, TranslatorInterface $translator): JsonResponse
    {
            // ..snip..
                $token = Tool\Authentication::generateTokenByUser($user);
                $loginUrl = $this->generateCustomUrl([
                    'token' => $token,
                    'reset' => true,
                ]);

                try {
                    $mail = Tool::getMail([$user->getEmail()], 'Pimcore login invitation for ' . Tool::getHostname());
                    $mail->setIgnoreDebugMode(true);
                    $mail->text("Login to pimcore and change your password using the following link. This temporary login link will expire in  24 hours: \r\n\r\n" . $loginUrl);
                    $mail->send();
      // ..snip..
    }
    // ..snip..
    private function generateCustomUrl(array $params, string $fallbackUrl = 'pimcore_admin_login_check', int $referenceType = UrlGeneratorInterface::ABSOLUTE_URL): string
    {
        try {
            $adminEntryPointRoute = $this->getParameter('pimcore_admin.custom_admin_route_name');

            //try to generate invitation link for custom admin point
            $loginUrl = $this->generateUrl($adminEntryPointRoute, $params, $referenceType);
        } catch (\Exception $e) {
            //use default login check for invitation link
            $loginUrl = $this->generateUrl($fallbackUrl, $params, $referenceType);
        }

        return $loginUrl;
    }

The $loginUrl variable is constructed using the generateCustomUrl function. If an attacker injects a malicious host header into a POST request, the resulting $loginUrl will include the malicious domain, and this link is then sent via email to the user.

Proof of Concept

Here is an example of a request that exploits this vulnerability:

POST /admin/user/invitationlink HTTP/1.1 
Host: attacker-domain.evil 
Cookie: PHPSESSID=test
X-pimcore-extjs-version-major: 7
X-pimcore-extjs-version-minor: 0
X-Requested-With: XMLHttpRequest
X-pimcore-csrf-token: 961c37cf60edfdc2eec5a705cb048aaa8c32804d

username=[username of a valid user]

The URL in the email will look like: http://attacker-domain.evil/admin/login/login?token=[TOKEN]

Impact

This vulnerability can be used to perform phishing attacks by making the URLs in the invitation links emails point to an attacker-controlled domain.

Remediation

We recommend validating the host header and ensuring it matches the application's domain. It would also be beneficial to use a default trusted host or hostname if the incoming host header is not recognized or is absent.

Similar vulnerability (CVE-2024-23648) has been fixed in this project (https://github.com/pimcore/admin-ui-classic-bundle/commit/70f2205b5a5ea9584721d4f3e803f4d0dd5e4655)

Credit

Discovered by @v0lck3r (Oussama RAHALI), Feb 2024.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer pimcore/admin-ui-classic-bundle < 1.3.4 1.3.4

Referencias

Puntuación CVSS 8.1/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
Debilidad (CWE)
CWE-74
Plataforma
Composer
Paquete
pimcore/admin-ui-classic-bundle
Publicada
20.02.2024
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-3qpq-6w89-f7mx - CC BY 4.0

Historial de vulnerabilidades: pimcore/admin-ui-classic-bundle

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (17) en el archivo
Entradas en total
17
Primera → última
07.2023 05.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 6
  • Media 10
  • Baja 1

Divulgaciones por año

  1. 2023: 6
  2. 2024: 7
  3. 2025: 2
  4. 2026: 2
Gravedad:
  1. Alta · 8.8 ghsa-hq76-662x-7mw4 < 1.3.11, >= 1.4.0, < 1.4.7, >= 1.5.0, < 1.5.4 1.3.11, 1.4.7, 1.5.4
  2. Pimcore Host Header Injection in user invitation link esta entrada
    Alta · 8.1 CVE-2024-25625 < 1.3.4 1.3.4
  3. Alta · 8.8 CVE-2024-23648 < 1.2.3 1.2.3
  4. Alta · 8.8 CVE-2024-23646 >= 1.0.0, < 1.3.2 1.3.2

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.