VYPR
Moderate severityNVD Advisory· Published Mar 12, 2025· Updated Mar 12, 2025

Flarum Vulnerable to Session Hijacking via Authoritative Subdomain Cookie Overwrite

CVE-2025-27794

Description

Flarum is open-source forum software. A session hijacking vulnerability exists in versions prior to 1.8.10 when an attacker-controlled authoritative subdomain under a parent domain (e.g., subdomain.host.com) sets cookies scoped to the parent domain (.host.com). This allows session token replacement for applications hosted on sibling subdomains (e.g., community.host.com) if session tokens aren't rotated post-authentication. Key Constraints are that the attacker must control any subdomain under the parent domain (e.g., evil.host.com or x.y.host.com), and the parent domain must not be on the Public Suffix List. Due to non-existent session token rotation after authenticating we can theoretically reproduce the vulnerability by using browser dev tools, but due to the browser's security measures this does not seem to be exploitable as described. Version 1.8.10 contains a patch for the issue.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
flarum/corePackagist
< 1.8.101.8.10
flarum/frameworkPackagist
< 1.8.101.8.10

Affected products

1

Patches

1
a05aaea3ee1e

Merge commit from fork

https://github.com/flarum/frameworkSimonMar 12, 2025via ghsa
1 file changed · +12 1
  • framework/core/src/Http/Middleware/RememberFromCookie.php+12 1 modified
    @@ -45,7 +45,18 @@ public function process(Request $request, Handler $handler): Response
     
                     /** @var \Illuminate\Contracts\Session\Session $session */
                     $session = $request->getAttribute('session');
    -                $session->put('access_token', $token->token);
    +                $currentAccessToken = $session->get('access_token');
    +
    +                if ($currentAccessToken !== $token->token) {
    +                    $session->invalidate();
    +                    $session->regenerateToken();
    +
    +                    if ($currentAccessToken) {
    +                        AccessToken::whereToken($currentAccessToken)->delete();
    +                    }
    +
    +                    $session->put('access_token', $token->token);
    +                }
                 }
             }
     
    

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

5

News mentions

0

No linked articles in our index yet.