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-2026-97650 Overview
CVE-2026-97650 is a cross-site scripting (XSS) vulnerability [CWE-79] in the ningzichun student-management-system project, affecting commits up to 98760f5711cf6dc8b4adca53a9e207ca49b02ebf. The flaw resides in the echo function within admin/fun/addLog.php, where the reason and detail parameters are rendered without proper output encoding. Attackers can inject arbitrary JavaScript that executes in the browser of an administrator viewing the log entry. The exploit has been publicly disclosed, and the maintainer has not responded to the issue report filed against the project.
Critical Impact
Remote attackers can inject arbitrary script content through the reason or detail arguments, enabling session theft, UI manipulation, or request forgery against authenticated administrators.
Affected Products
- ningzichun student-management-system (GitHub repository)
- All revisions up to and including commit 98760f5711cf6dc8b4adca53a9e207ca49b02ebf
- Component: admin/fun/addLog.php
Discovery Timeline
- 2026-09-25 - CVE-2026-97650 published to the National Vulnerability Database (NVD)
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97650
Vulnerability Analysis
The vulnerability is a reflected or stored cross-site scripting flaw in the administrative logging functionality of the application. The addLog.php script accepts the reason and detail HTTP parameters and passes them to a PHP echo statement without applying HTML entity encoding or input sanitization. When a victim loads the resulting page, the browser parses attacker-supplied markup as executable script.
Because the vulnerable endpoint lives under the admin/ directory, successful exploitation typically targets authenticated administrators. An attacker who tricks an admin into visiting a crafted URL, or who can inject log entries through another input vector, can run JavaScript in the admin's session context.
Root Cause
The root cause is missing output encoding on user-controlled input [CWE-79]. The echo call in admin/fun/addLog.php writes the reason and detail arguments directly into the HTML response body. PHP applications must apply htmlspecialchars() or an equivalent context-aware encoder before rendering untrusted data to prevent script injection.
Attack Vector
The attack is remote and requires user interaction, consistent with typical reflected XSS exploitation. An attacker crafts a URL containing a malicious payload in the reason or detail parameter and delivers it through phishing, chat, or a watering-hole page. When an administrator follows the link, the injected JavaScript executes with the privileges of the current admin session, allowing cookie theft, session riding, or arbitrary administrative actions through forged requests. No authentication is required to craft the payload, and the exploit has been disclosed publicly through VulDB CVE-2026-97650.
Detection Methods for CVE-2026-97650
Indicators of Compromise
- Web server access logs showing requests to admin/fun/addLog.php with reason or detail parameters containing HTML tags, <script>, javascript:, event handlers such as onerror=, or encoded variants like %3Cscript%3E.
- Unexpected outbound requests from administrator browsers to attacker-controlled domains shortly after accessing log pages.
- Log entries in the application database containing raw HTML or script fragments in the reason or detail fields.
Detection Strategies
- Deploy a web application firewall (WAF) rule that inspects query strings and POST bodies to addLog.php for XSS signatures and blocks or alerts on matches.
- Review stored log records in the database for persisted script payloads that could trigger on later page views.
- Correlate admin authentication events with anomalous session activity, such as new privileged actions following access to log pages.
Monitoring Recommendations
- Enable verbose HTTP request logging on the admin/ path and ship logs to a centralized analytics platform for signature and anomaly review.
- Monitor Content Security Policy (CSP) violation reports if CSP is deployed, as inline script injections will generate report events.
- Track administrator user-agent, source IP, and session cookie changes to detect session hijacking that may follow successful XSS execution.
How to Mitigate CVE-2026-97650
Immediate Actions Required
- Restrict access to the admin/ directory to trusted IP ranges or require VPN access until a fix is applied.
- Instruct administrators to avoid clicking untrusted links that reference the application and to use isolated browser profiles for administrative sessions.
- Audit existing log data for stored XSS payloads and purge or neutralize any malicious entries.
Patch Information
No vendor patch is available. The maintainer was notified through GitHub Issue #11 but has not responded. Operators should apply a local fix by wrapping output of the reason and detail variables with htmlspecialchars($value, ENT_QUOTES | ENT_HTML5, 'UTF-8') in admin/fun/addLog.php and validating input server-side. Monitor the project repository for upstream remediation.
Workarounds
- Deploy a WAF rule that blocks requests to addLog.php containing <, >, or script tokens in the reason or detail parameters.
- Add a strict Content Security Policy header such as Content-Security-Policy: default-src 'self'; script-src 'self' to prevent execution of inline injected scripts.
- Set the HttpOnly and Secure flags on administrator session cookies to reduce the impact of script-based cookie theft.
# Example Apache configuration to add a restrictive CSP and secure cookie flags
Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'"
Header always edit Set-Cookie ^(.*)$ "$1; HttpOnly; Secure; SameSite=Strict"
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

