DEV Community

CVE Reports
CVE Reports

Posted on Originally published at cvereports.com

CVE-2026-77376: CVE-2026-77376: Open Redirect in Bolt CMS LoginFormAuthenticator

CVE-2026-77376: Open Redirect in Bolt CMS LoginFormAuthenticator

Vulnerability ID: CVE-2026-77376
CVSS Score: 6.1
Published: 2026-11-20

CVE-2026-77376 is an open redirect vulnerability (CWE-601) in the core framework of Bolt CMS prior to version 6.1.4. The vulnerability resides within the LoginFormAuthenticator class, which processes post-authentication redirection for both successful and failed login attempts. Due to a lack of destination validation, the application accepts untrusted target paths from user sessions and directly reflects unvalidated HTTP Referer headers into HTTP Location response headers. Attackers can exploit this behavior to redirect users to arbitrary external domains after interacting with the Bolt login endpoint, facilitating credential harvesting and phishing attacks.

TL;DR

Bolt CMS versions prior to 6.1.4 contain an open redirect vulnerability in LoginFormAuthenticator. Both successful and failed login flows fail to validate redirect destinations, allowing attackers to redirect users to external domains via session manipulation or HTTP Referer header injection. Upgrade bolt/core to version 6.1.4 to remediate.


Technical Details

  • CVE ID: CVE-2026-77376 (GHSA-xr6g-7g83-j865)
  • Vulnerability Class: CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
  • Affected Component: Bolt\Security\LoginFormAuthenticator (bolt/core < 6.1.4)
  • CVSS v3.1 Score: 6.1 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
  • Attack Vector: Network (Unauthenticated HTTP POST to /bolt/login)
  • Impact: Post-authentication open redirection enabling phishing and credential harvesting
  • Exploit Status: None / Advisory Only (No public exploits tracked in KEV or ExploitDB)
  • Fixed Version: bolt/core 6.1.4

Affected Systems

  • Bolt CMS (bolt/core) < 6.1.4
  • bolt/core: < 6.1.4 (Fixed in: 6.1.4)

Code Analysis

Commit: db37ed5

Block open redirect on login endpoint

File: phpstan-baseline.php
@@ -3409,12 +3409,6 @@
    'count' => 1,
    'path' => __DIR__ . '/src/Security/GlobalVoter.php',
 ];
-$ignoreErrors[] = [
-   'message' => '#^Parameter \\#1 \\$url of class Symfony\\\\Component\\\\HttpFoundation\\\\RedirectResponse constructor expects string, string\\|null given\\.$#',
-   'identifier' => 'argument.type',
-   'count' => 1,
-   'path' => __DIR__ . '/src/Security/LoginFormAuthenticator.php',
-];
 $ignoreErrors[] = [
    'message' => '#^Class Bolt\\\\Security\\\\SwitchUserVoter extends generic class Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter but does not specify its types\\: TAttribute, TSubject$#',
    'identifier' => 'missingType.generics',

File: src/Security/LoginFormAuthenticator.php
@@ -18,20 +18,23 @@
 use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
 use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials;
 use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
+use Symfony\Component\Security\Http\HttpUtils;
 use Symfony\Component\Security\Http\SecurityRequestAttributes;

 class LoginFormAuthenticator extends AbstractAuthenticator implements AuthenticatorInterface
 {
     public function __construct(
         private readonly Security $security,
         private readonly UserRepository $userRepository,
-        private readonly RouterInterface $router
+        private readonly RouterInterface $router,
+        private readonly HttpUtils $httpUtils,
     ) {
     }

     public function supports(Request $request): ?bool
     {
-        return $request->attributes->get('_route') === 'bolt_login' && $request->isMethod('POST');
+        return $request->attributes->get('_route') === 'bolt_login'
+            && $request->isMethod(Request::METHOD_POST);
     }

     public function authenticate(Request $request): Passport
@@ -68,7 +71,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
             $fallback = $this->router->generate('homepage');
         }

-        return new RedirectResponse($request->getSession()->get(
+        return $this->httpUtils->createRedirectResponse($request, $request->getSession()->get(
             '_security.' . $firewallName . '.target_path',
             $fallback
         ));
@@ -81,6 +84,6 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
         }

         // Redirect back to where we came from
-        return new RedirectResponse($request->headers->get('referer'));
+        return new RedirectResponse($this->router->generate('bolt_login'));
     }
 }
Enter fullscreen mode Exit fullscreen mode

Mitigation Strategies

  • Upgrade bolt/core to version 6.1.4 or later to enforce Symfony HttpUtils redirect validation and deterministic failure routing.
  • Configure reverse proxies or Web Application Firewalls (WAF) to inspect outbound HTTP 302 Location headers from /bolt/login and block or rewrite external domain redirects.
  • Enforce strict Referrer-Policy headers (such as same-origin) across internal properties and monitor access logs for cross-origin POST requests to /bolt/login.

Remediation Steps:

  1. Run 'composer update bolt/core' in the Bolt CMS project root directory to pull version 6.1.4 or higher.
  2. Verify that composer.lock reflects bolt/core version 6.1.4 or greater.
  3. Clear and warm up the Symfony production cache using 'php bin/console cache:clear --env=prod' so the updated dependency injection container wires HttpUtils into LoginFormAuthenticator.
  4. Test the login endpoint with an invalid credential POST request containing an external Referer header and verify the response redirects strictly to /bolt/login.

References


Read the full report for CVE-2026-77376 on our website for more details including interactive diagrams and full exploit analysis.

Top comments (0)