CVE-2026-31940: User Controlled Session Id

The application directly assigns user-controlled input to `session_id()`. This can allow an attacker to force a known session ID on a user, resulting in a session fixation vulnerability. If the victim authenticates using this session, the attacker may hijack their account. Rely on native PHP session management and ensure `session_regenerate_id()` is called u

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0PHP
greprules fetch cve-2026-31940-user-controlled-session-id --engine opengrep

Description

The application directly assigns user-controlled input to `session_id()`. This can allow an attacker to force a known session ID on a user, resulting in a session fixation vulnerability. If the victim authenticates using this session, the attacker may hijack their account. Rely on native PHP session management and ensure `session_regenerate_id()` is called u