CVE-2026-4972
Cross-Site Scripting in Online Reviewer System btn_functions.php
Publication date: 2026-03-27
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| code-projects | online_reviewer_system | to 1.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-4972 is a Stored Cross-Site Scripting (XSS) vulnerability in the Online Reviewer System version 1.0. It occurs due to improper handling of user input in the description parameter within the btn_functions.php file. Specifically, user input from the description field is directly inserted into the database without validation or sanitization. When this stored input is later displayed in the web interface without proper HTML escaping, it allows malicious HTML or JavaScript code to execute in the browsers of users who view the affected content.
This vulnerability arises during an action=update POST request where the description parameter is processed insecurely. Because the malicious payload is stored server-side, it executes persistently whenever the compromised question is viewed.
How can this vulnerability impact me? :
This vulnerability can have several impacts including:
- Execution of arbitrary JavaScript code in the browsers of users viewing the compromised content.
- Theft of authentication cookies which can lead to session hijacking.
- Hijacking of administrator sessions allowing unauthorized control over the application.
- Unauthorized actions performed within the application by attackers.
- Injection of malicious content into exam questions or other displayed data.
- Phishing attacks targeting users of the application by exploiting the injected scripts.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by testing the affected endpoint for stored cross-site scripting (XSS) in the description parameter via HTTP POST requests.
A practical detection method is to send a crafted POST request to the vulnerable endpoint with a payload in the description parameter that triggers a JavaScript execution when the stored data is viewed.
For example, using curl to test the vulnerability:
- curl -X POST -d "action=update&description=<details/open/ontoggle=prompt(origin)>" https://yourserver/OnlineReviewerSystem_PHP/reviewer/system/system/admins/assessments/databank/btn_functions.php
If the payload executes (e.g., a JavaScript prompt appears) when viewing the affected question in the web interface, the vulnerability is present.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability allows execution of arbitrary JavaScript in victim browsers, which can lead to theft of authentication cookies, hijacking of administrator sessions, unauthorized actions within the application, injection of malicious content, and phishing attacks targeting users.
Such security issues can compromise the confidentiality and integrity of user data, potentially violating data protection regulations like GDPR and HIPAA that require safeguarding personal and sensitive information against unauthorized access and attacks.
Therefore, this vulnerability may negatively impact compliance with these standards by exposing user data to unauthorized access and manipulation.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include sanitizing and validating user input before storing it in the database and encoding output before rendering it in the web interface.
- Use output encoding functions such as htmlspecialchars() in PHP to encode user data before display, e.g., echo htmlspecialchars($row['question_desc'], ENT_QUOTES, 'UTF-8');
- Implement prepared statements for database queries to avoid unsafe query construction, for example: $stmt = $conn->prepare("UPDATE questions SET question_desc = ? WHERE q_id = ?"); $stmt->execute([$description, $q_id]);
- Apply input validation and sanitization on the description parameter to reject or clean malicious input.
- Deploy a Content Security Policy (CSP) header to restrict script execution, e.g., Content-Security-Policy: default-src 'self'