Anonymous Intelligence Signal

Session Fixation Vulnerability in login.php Exposes User Sessions to Hijacking

human The Lab unverified 2026-04-09 19:27:17 Source: GitHub Issues

A critical session management flaw in a login system leaves authenticated user sessions vulnerable to hijacking. The vulnerability, identified in the `login.php` file, stems from the application's failure to generate a new session identifier after a user successfully logs in. This oversight allows an attacker to potentially take over a victim's active session.

The core of the issue is a missing call to `session_regenerate_id(true);` immediately after successful authentication. In the current flawed flow, user data is assigned to the existing session without rotating its ID. This creates a classic Session Fixation attack vector: an attacker can pre-create a session ID, trick a victim into logging in using that fixed session, and then use the same ID to gain full access to the victim's authenticated session and privileges.

This vulnerability represents a direct threat to user account security and data privacy. Without remediation, any application relying on this login mechanism is exposed, allowing attackers to bypass authentication and impersonate legitimate users. The prescribed fix is straightforward but essential—implementing session ID regeneration before assigning user credentials to the session variable is a fundamental security control to invalidate any pre-existing, potentially malicious session identifiers.