Cybersecurity Vulnerabilities

FileCodeBox Hacked! Stored XSS Vulnerability Discovered (CVE-2025-51662)

Overview

A stored cross-site scripting (XSS) vulnerability, identified as CVE-2025-51662, has been discovered in FileCodeBox version 2.2 and earlier. This vulnerability allows attackers to inject malicious JavaScript code into shared text “codeboxes.” This injected code is then automatically executed in the browsers of any users who access the infected codebox, either by clicking a link or entering the share code.

Technical Details

The vulnerability stems from insufficient input validation within the text sharing feature of FileCodeBox. When a user creates or modifies a codebox, the application fails to properly sanitize or encode the input before storing it in the database. As a result, an attacker can inject arbitrary JavaScript code into the codebox content. When another user views the compromised codebox, the stored JavaScript is executed within their browser context. This can lead to a variety of malicious actions, including session hijacking, defacement, and redirection to phishing sites.

CVSS Analysis

Currently, the CVSS score and severity rating for CVE-2025-51662 are marked as N/A. However, given the nature of stored XSS vulnerabilities and their potential for widespread impact, this vulnerability should be considered a significant security risk. Awaiting further CVSS analysis to properly assess severity. Even without the formal analysis, best practices call for immediate patching.

Possible Impact

The exploitation of this stored XSS vulnerability can have serious consequences:

  • Account Compromise: Attackers can steal user session cookies, allowing them to impersonate legitimate users and gain unauthorized access to their accounts.
  • Data Theft: Malicious scripts can be used to steal sensitive information displayed within the FileCodeBox interface or other web applications accessed from the same browser.
  • Website Defacement: Attackers can modify the appearance of the FileCodeBox interface to spread misinformation or damage the application’s reputation.
  • Malware Distribution: The injected JavaScript code can redirect users to websites that host malware, infecting their systems.
  • Phishing Attacks: Attackers can create fake login forms that steal user credentials.

Mitigation and Patch Steps

To mitigate the risk of CVE-2025-51662, it is crucial to take the following steps:

  1. Upgrade FileCodeBox: Upgrade to the latest version of FileCodeBox as soon as a patch is released by the vendor. Check the official FileCodeBox GitHub repository for updates.
  2. Input Validation: Implement robust input validation and output encoding mechanisms to prevent the injection of malicious code. Sanitize all user-supplied input before storing it in the database.
  3. Content Security Policy (CSP): Configure a strong Content Security Policy (CSP) to restrict the sources from which the browser can load resources. This can help mitigate the impact of XSS attacks.
  4. Web Application Firewall (WAF): Consider deploying a Web Application Firewall (WAF) to detect and block XSS attacks.

References

CVE-2025-51662
FileCodeBox GitHub Repository
FileCodeBox Issue #351

Cybersecurity specialist and founder of Gowri Shankar Infosec - a professional blog dedicated to sharing actionable insights on cybersecurity, data protection, server administration, and compliance frameworks including SOC 2, PCI DSS, and GDPR.

Leave a Reply

Your email address will not be published. Required fields are marked *