The vulnerability is a session hijacking weakness caused by an insecure Cross-Origin Resource Sharing (CORS) configuration. The core of the issue is in the allowOrigin() function within objects/functions.php. This function improperly validated the origin of requests, reflecting any Origin header from the request into the Access-Control-Allow-Origin response header and setting Access-Control-Allow-Credentials: true. This allowed any website to make authenticated cross-origin requests.
The vulnerability was exposed through the objects/phpsessionid.json.php endpoint. This script, which retrieves the user's session ID using session_id(), called the vulnerable allowOrigin() function. An attacker could trick a logged-in user into visiting a malicious website, which would then make a cross-origin request to phpsessionid.json.php. Due to the flawed CORS policy, the attacker's site could read the response, capture the user's session ID, and hijack their session, gaining full control of the account.
The patch remediates this by modifying allowOrigin() to strictly validate the request's origin against the site's own configured origin before allowing credentialed access. Additionally, the call to allowOrigin() was removed entirely from phpsessionid.json.php, restricting its use to same-origin contexts as intended.