{"id":"CVE-2024-25625","aliases":["CVE-2024-25625","GHSA-3qpq-6w89-f7mx"],"related":[],"kind":"vulnerability","state":"published","title":"Pimcore Host Header Injection in user invitation link","summary":"Pimcore's Admin Classic Bundle provides a Backend UI for Pimcore. A potential security vulnerability has been discovered in `pimcore/admin-ui-classic-bundle` prior to version 1.3.4. The vulnerability involves a Host Header Injection in the `invitationLinkAction` function of the UserController, specifically in the way `$loginUrl` trusts user input.  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. This vulnerability can be used to perform phishing attacks by making the URLs in the invitation links emails point to an attacker-controlled domain. Version 1.3.4 contains a patch for the vulnerability. The maintainers 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pimcore's Admin Classic Bundle provides a Backend UI for Pimcore. A potential security vulnerability has been discovered in `pimcore/admin-ui-classic-bundle` prior to version 1.3.4. The vulnerability involves a Host Header Injection in the `invitationLinkAction` function of the UserController, specifically in the way `$loginUrl` trusts user input.  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. This vulnerability can be used to perform phishing attacks by making the URLs in the invitation links emails point to an attacker-controlled domain. Version 1.3.4 contains a patch for the vulnerability. The maintainers 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.","source":"cvelist"},{"lang":"en","text":"## Overview\n\nA 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. \n\n## Details\n\nThe 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. \n\nIn 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.\n\nHere is an excerpt from the affected section of UserController.php file:\n```\n// /src/Controller/Admin/UserController.php \n    public function invitationLinkAction(Request $request, TranslatorInterface $translator): JsonResponse\n    {\n            // ..snip..\n                $token = Tool\\Authentication::generateTokenByUser($user);\n                $loginUrl = $this->generateCustomUrl([\n                    'token' => $token,\n                    'reset' => true,\n                ]);\n\n                try {\n                    $mail = Tool::getMail([$user->getEmail()], 'Pimcore login invitation for ' . Tool::getHostname());\n                    $mail->setIgnoreDebugMode(true);\n                    $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);\n                    $mail->send();\n      // ..snip..\n    }\n    // ..snip..\n    private function generateCustomUrl(array $params, string $fallbackUrl = 'pimcore_admin_login_check', int $referenceType = UrlGeneratorInterface::ABSOLUTE_URL): string\n    {\n        try {\n            $adminEntryPointRoute = $this->getParameter('pimcore_admin.custom_admin_route_name');\n\n            //try to generate invitation link for custom admin point\n            $loginUrl = $this->generateUrl($adminEntryPointRoute, $params, $referenceType);\n        } catch (\\Exception $e) {\n            //use default login check for invitation link\n            $loginUrl = $this->generateUrl($fallbackUrl, $params, $referenceType);\n        }\n\n        return $loginUrl;\n    }\n```\nThe $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.\n\n## Proof of Concept\n\nHere is an example of a request that exploits this vulnerability:\n```\nPOST /admin/user/invitationlink HTTP/1.1 \nHost: attacker-domain.evil \nCookie: PHPSESSID=test\nX-pimcore-extjs-version-major: 7\nX-pimcore-extjs-version-minor: 0\nX-Requested-With: XMLHttpRequest\nX-pimcore-csrf-token: 961c37cf60edfdc2eec5a705cb048aaa8c32804d\n\nusername=[username of a valid user]\n```\n\n\nThe URL in the email will look like: `http://attacker-domain.evil/admin/login/login?token=[TOKEN]`\n\n## Impact\n\nThis vulnerability can be used to perform phishing attacks by making the URLs in the invitation links emails point to an attacker-controlled domain.\n\n## Remediation\n\nWe 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.\n\nSimilar vulnerability (CVE-2024-23648) has been fixed in this project  (https://github.com/pimcore/admin-ui-classic-bundle/commit/70f2205b5a5ea9584721d4f3e803f4d0dd5e4655)\n\n## Credit\n\nDiscovered by @v0lck3r (Oussama RAHALI), Feb 2024.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete Admin Classic de Pimcore proporciona una interfaz de usuario de backend para Pimcore. Se ha descubierto una posible vulnerabilidad de seguridad en `pimcore/admin-ui-classic-bundle` anterior a la versión 1.3.4. La vulnerabilidad implica una inyección de encabezado de host en la función `invitationLinkAction` del UserController, específicamente en la forma en que `$loginUrl` confía en la entrada del usuario. El encabezado del host de las solicitudes HTTP entrantes se utiliza de forma insegura al generar URL. Un atacante puede manipular el encabezado del host HTTP en solicitudes al ednpoint /admin/user/invitationlink, lo que genera la generación de URL con el dominio del atacante. De hecho, si se inyecta un encabezado de host en la solicitud POST, el parámetro $loginURL se construye con este encabezado de host no validado. Luego se utiliza para enviar un correo electrónico de invitación al usuario proporcionado. Esta vulnerabilidad se puede utilizar para realizar ataques de phishing haciendo que las URL de los correos electrónicos con enlaces de invitación apunten a un dominio controlado por el atacante. La versión 1.3.4 contiene un parche para la vulnerabilidad. Los fabricantes recomiendan validar el encabezado del host y asegurarse de que coincida con el dominio de la aplicación. También sería beneficioso utilizar un host o nombre de host confiable predeterminado si el encabezado del host entrante no se reconoce o está ausente.","source":"nvd"}],"published":"2024-02-19T15:41:29.147Z","modified":"2026-09-10T03:50:05.262Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"rating":"CRITICAL"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"< 1.3.4","status":"affected"}],"vendor":"pimcore","product":"admin-ui-classic-bundle","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1.0.0","fixed":"1.3.4","status":"affected"}],"vendor":"pimcore","product":"admin_classic_bundle","cpe":"cpe:2.3:a:pimcore:admin_classic_bundle:1.0.0:-:*:*:*:pimcore:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.3.4"}],"ecosystem":"Packagist","package":"pimcore/admin-ui-classic-bundle","purl":"pkg:composer/pimcore/admin-ui-classic-bundle","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.3.4"}],"vendor":"pimcore","product":"admin_classic_bundle","cpe":"cpe:2.3:a:pimcore:admin_classic_bundle:*:*:*:*:*:pimcore:*:*","source":"nvd"}],"references":[{"url":"https://github.com/pimcore/admin-ui-classic-bundle/security/advisories/GHSA-3qpq-6w89-f7mx","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/pimcore/admin-ui-classic-bundle/commit/b9fee9d383fc73dbd5e1d98dbb0ff3266d6b5a82","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25625","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pimcore/admin-ui-classic-bundle","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-08-14T13:46:22.717Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-25625","url":"https://www.cve.org/CVERecord?id=CVE-2024-25625","licence":"CVE Terms of Use","modified":"2024-08-14T13:47:42.851Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3qpq-6w89-f7mx","url":"https://github.com/advisories/GHSA-3qpq-6w89-f7mx","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:05.262Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-25625","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25625","licence":"Public domain","modified":"2026-06-17T07:16:19.050Z"}],"updatedAt":"2026-11-25T22:58:36.897Z","epss":{"score":0.00764,"percentile":0.5176,"date":"2026-11-30T12:00:22.000Z"}}