VYPR
High severityNVD Advisory· Published Feb 19, 2024· Updated Aug 14, 2024

Pimcore Host Header Injection in user invitation link

CVE-2024-25625

Description

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
pimcore/admin-ui-classic-bundlePackagist
< 1.3.41.3.4

Affected products

1

Patches

1
b9fee9d383fc

[Security]: Prevent potential host injection in invitation link (#428)

1 file changed · +12 1
  • src/Controller/Admin/UserController.php+12 1 modified
    @@ -25,6 +25,7 @@
     use Pimcore\Model\DataObject;
     use Pimcore\Model\Element;
     use Pimcore\Model\User;
    +use Pimcore\SystemSettingsConfig;
     use Pimcore\Tool;
     use Symfony\Component\HttpFoundation\File\UploadedFile;
     use Symfony\Component\HttpFoundation\JsonResponse;
    @@ -35,6 +36,7 @@
     use Symfony\Component\HttpKernel\Event\ControllerEvent;
     use Symfony\Component\Routing\Annotation\Route;
     use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
    +use Symfony\Component\Routing\RouterInterface;
     use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
     use Symfony\Component\Validator\Validator\ValidatorInterface;
     use Symfony\Contracts\Translation\TranslatorInterface;
    @@ -1160,7 +1162,7 @@ public function getDefaultKeyBindingsAction(Request $request): JsonResponse
          *
          * @throws \Exception
          */
    -    public function invitationLinkAction(Request $request, TranslatorInterface $translator): JsonResponse
    +    public function invitationLinkAction(Request $request, TranslatorInterface $translator, RouterInterface $router): JsonResponse
         {
             $success = false;
             $message = '';
    @@ -1187,6 +1189,15 @@ public function invitationLinkAction(Request $request, TranslatorInterface $tran
                     }
     
                     $token = Tool\Authentication::generateTokenByUser($user);
    +
    +                $domain = SystemSettingsConfig::get()['general']['domain'];
    +                if (!$domain) {
    +                    throw new \Exception('No main domain set in system settings, unable to generate login invitation link');
    +                }
    +
    +                $context = $router->getContext();
    +                $context->setHost($domain);
    +
                     $loginUrl = $this->generateCustomUrl([
                         'token' => $token,
                         'reset' => true,
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.