Skip to main content
Vulnerability Database/CVE-2024-12955

CVE-2024-12955: Blood Bank & Donor Management System CSRF

CVE-2024-12955 is a cross-site request forgery flaw in PHPGurukul Blood Bank & Donor Management System 2.4 affecting the logout.php file. Attackers can exploit this remotely to perform unauthorized actions on behalf of users. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-12955 Overview

CVE-2024-12955 is a Cross-Site Request Forgery (CSRF) vulnerability in PHPGurukul Blood Bank & Donor Management System 2.4. The flaw resides in the /logout.php endpoint, which does not validate the origin of incoming requests. An attacker can craft a malicious page that forces an authenticated user's browser to issue a logout request without consent. Exploitation is remote and requires no authentication from the attacker, only an active session held by the victim. The vulnerability is classified under CWE-352: Cross-Site Request Forgery. Technical details have been published to VulDB entry #289318.

Critical Impact

Attackers can forcibly terminate authenticated sessions of Blood Bank & Donor Management System users via crafted cross-origin requests, degrading availability of the application for legitimate operators.

Affected Products

  • PHPGurukul Blood Bank & Donor Management System 2.4
  • /logout.php endpoint of the application
  • Deployments exposing the web interface to untrusted networks

Discovery Timeline

  • 2024-12-26 - CVE-2024-12955 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in the NVD database

Technical Details for CVE-2024-12955

Vulnerability Analysis

The vulnerability stems from the absence of anti-CSRF controls on the /logout.php handler in PHPGurukul Blood Bank & Donor Management System 2.4. The endpoint processes session termination based solely on the presence of a valid session cookie. It does not verify a synchronizer token, a double-submit cookie, or the request Origin and Referer headers.

An attacker exploits this by hosting an HTML page that references /logout.php through an image tag, iframe, or auto-submitting form. When an authenticated user visits the attacker-controlled page, the browser attaches the session cookie and completes the logout. The user is silently signed out of the application.

Although the direct impact is limited to session termination, repeated exploitation disrupts donor management workflows. Attackers can also chain the logout action with phishing pages that mimic the login screen to harvest credentials when victims re-authenticate.

Root Cause

The /logout.php script processes state-changing requests without validating that the request originated from the application itself. PHPGurukul's codebase does not generate per-session CSRF tokens for logout actions, and the handler accepts any HTTP method that carries a valid PHPSESSID cookie. This design matches the classic CWE-352 pattern.

Attack Vector

Exploitation requires an authenticated victim to load attacker-controlled content in the same browser. The attacker delivers the payload through phishing emails, forum posts, malicious advertisements, or compromised third-party sites. No special privileges, user interaction beyond browsing, or local access are needed. The attack succeeds over the network against any reachable instance of the vulnerable application.

A proof-of-concept HTML page can embed a one-line reference such as <img src="https://victim.example/logout.php"> to trigger the logout silently when loaded. See the VulDB submission #468878 for the public disclosure details.

Detection Methods for CVE-2024-12955

Indicators of Compromise

  • Unexpected spikes in GET or POST requests to /logout.php with Referer headers pointing to external domains
  • Session termination events for authenticated users without a corresponding user-initiated logout action in application logs
  • Clusters of users being signed out within short time windows after visiting external links
  • Access log entries showing cross-origin requests to the application endpoint with mismatched Origin headers

Detection Strategies

  • Enable verbose logging on the PHP application and inspect Referer and Origin headers for /logout.php requests
  • Deploy a web application firewall rule that flags state-changing requests lacking same-origin headers
  • Correlate authentication events in the Blood Bank application with web server access logs to detect anomalous session invalidations

Monitoring Recommendations

  • Forward web server and PHP application logs to a centralized log platform for retention and search
  • Alert on sustained logout request rates that exceed baseline thresholds per source IP or user agent
  • Monitor outbound links from employee email and messaging systems for URLs pointing to the vulnerable endpoint

How to Mitigate CVE-2024-12955

Immediate Actions Required

  • Restrict access to the Blood Bank & Donor Management System web interface to trusted networks or VPN until a patched release is available
  • Deploy a web application firewall rule that rejects requests to /logout.php when the Origin or Referer header does not match the application domain
  • Advise users to log out of the application before browsing untrusted sites and to use isolated browser profiles for administrative tasks

Patch Information

No vendor patch has been referenced in the public advisory as of the last NVD update on 2026-06-17. Administrators should monitor the PHPGurukul website for updated releases and apply fixes as they are published.

Workarounds

  • Add a server-side check in /logout.php that validates a per-session CSRF token issued at login
  • Enforce SameSite=Strict on the session cookie to prevent the browser from attaching it to cross-site requests
  • Require the logout action to be submitted via a POST request originating from a page within the same origin
bash
# Example Apache mod_headers configuration to enforce SameSite on PHP session cookies
Header edit Set-Cookie ^(PHPSESSID=.*)$ "$1; SameSite=Strict; Secure; HttpOnly"

# Example mod_rewrite rule to block cross-origin logout requests
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/logout\.php$
RewriteCond %{HTTP_REFERER} !^https://your-domain\.example/ [NC]
RewriteRule .* - [F,L]

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.