CVE-2025-48494: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Forceu Gokapi
Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. When using end-to-end encryption, a stored cross-site scripting vulnerability can be exploited by uploading a file with JavaScript code embedded in the filename. After upload and every time someone opens the upload list, the script is then parsed. Prior to version 2.0.0, there was no user permission system implemented, therefore all authenticated users were already able to see and modify all resources, even if end-to-end encrypted, as the encryption key had to be the same for all users using a version prior to 2.0.0. If a user is the only authenticated user using Gokapi, they are not affected. This issue has been fixed in v2.0.0. A possible workaround would be to disable end-to-end encryption.
AI Analysis
Technical Summary
CVE-2025-48494 is a stored cross-site scripting (XSS) vulnerability identified in versions of the Forceu Gokapi self-hosted file sharing server prior to 2.0.0. Gokapi supports automatic expiration and encryption of shared files, including end-to-end encryption (E2EE). The vulnerability arises because the application improperly neutralizes input during web page generation, specifically failing to sanitize JavaScript code embedded within filenames of uploaded files. When a malicious user uploads a file with a crafted filename containing JavaScript code, that code is stored and subsequently executed every time the upload list is viewed by any authenticated user. This stored XSS can lead to script execution in the context of the victim's browser, potentially allowing session hijacking, unauthorized actions, or data theft. Compounding the risk, versions prior to 2.0.0 lack a user permission system, meaning all authenticated users share the same encryption key and have full access to all resources. Therefore, any authenticated user can exploit this vulnerability to affect all other users. If only one user is authenticated, the risk is reduced as there are no other users to attack. The vulnerability is fixed in version 2.0.0, which introduces user permissions and presumably better input sanitization. A temporary workaround is to disable end-to-end encryption, which likely changes how filenames are handled or displayed, mitigating the XSS vector. The CVSS 4.0 base score is 4.8 (medium severity), reflecting network attack vector, low attack complexity, no privileges required beyond authentication, and user interaction needed. No known exploits are reported in the wild as of publication.
Potential Impact
For European organizations using Gokapi versions prior to 2.0.0, this vulnerability poses a moderate risk to confidentiality and integrity of shared files and user sessions. The stored XSS can enable attackers to execute arbitrary scripts in the browsers of authenticated users, potentially leading to session hijacking, credential theft, or unauthorized file access/modification. Since all authenticated users share the same encryption key and permissions, a single compromised user can escalate the impact across the organization’s file sharing environment. This is particularly concerning for organizations handling sensitive or regulated data, such as those in finance, healthcare, or government sectors within Europe. The lack of user permission controls increases the risk of insider threats or lateral movement. Availability impact is limited but could occur if malicious scripts disrupt normal application use. The medium CVSS score reflects these moderate impacts combined with the need for user interaction and authentication. Organizations relying on Gokapi for secure file sharing should consider this vulnerability a notable risk, especially in multi-user deployments.
Mitigation Recommendations
1. Upgrade to Gokapi version 2.0.0 or later immediately, as this version fixes the vulnerability and introduces user permission controls. 2. If upgrading is not immediately possible, disable end-to-end encryption as a temporary workaround to mitigate the XSS attack vector. 3. Implement strict input validation and output encoding on all user-supplied data, especially filenames, to prevent script injection. 4. Restrict authentication to trusted users only and monitor for unusual activity that could indicate exploitation attempts. 5. Educate users to be cautious when interacting with file lists and uploaded content, especially if unexpected behavior is observed. 6. Employ Content Security Policy (CSP) headers to limit the impact of any injected scripts. 7. Regularly audit and review user permissions and encryption key management to minimize exposure. 8. Monitor vendor advisories and threat intelligence feeds for any emerging exploit attempts or patches.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2025-48494: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Forceu Gokapi
Description
Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. When using end-to-end encryption, a stored cross-site scripting vulnerability can be exploited by uploading a file with JavaScript code embedded in the filename. After upload and every time someone opens the upload list, the script is then parsed. Prior to version 2.0.0, there was no user permission system implemented, therefore all authenticated users were already able to see and modify all resources, even if end-to-end encrypted, as the encryption key had to be the same for all users using a version prior to 2.0.0. If a user is the only authenticated user using Gokapi, they are not affected. This issue has been fixed in v2.0.0. A possible workaround would be to disable end-to-end encryption.
AI-Powered Analysis
Technical Analysis
CVE-2025-48494 is a stored cross-site scripting (XSS) vulnerability identified in versions of the Forceu Gokapi self-hosted file sharing server prior to 2.0.0. Gokapi supports automatic expiration and encryption of shared files, including end-to-end encryption (E2EE). The vulnerability arises because the application improperly neutralizes input during web page generation, specifically failing to sanitize JavaScript code embedded within filenames of uploaded files. When a malicious user uploads a file with a crafted filename containing JavaScript code, that code is stored and subsequently executed every time the upload list is viewed by any authenticated user. This stored XSS can lead to script execution in the context of the victim's browser, potentially allowing session hijacking, unauthorized actions, or data theft. Compounding the risk, versions prior to 2.0.0 lack a user permission system, meaning all authenticated users share the same encryption key and have full access to all resources. Therefore, any authenticated user can exploit this vulnerability to affect all other users. If only one user is authenticated, the risk is reduced as there are no other users to attack. The vulnerability is fixed in version 2.0.0, which introduces user permissions and presumably better input sanitization. A temporary workaround is to disable end-to-end encryption, which likely changes how filenames are handled or displayed, mitigating the XSS vector. The CVSS 4.0 base score is 4.8 (medium severity), reflecting network attack vector, low attack complexity, no privileges required beyond authentication, and user interaction needed. No known exploits are reported in the wild as of publication.
Potential Impact
For European organizations using Gokapi versions prior to 2.0.0, this vulnerability poses a moderate risk to confidentiality and integrity of shared files and user sessions. The stored XSS can enable attackers to execute arbitrary scripts in the browsers of authenticated users, potentially leading to session hijacking, credential theft, or unauthorized file access/modification. Since all authenticated users share the same encryption key and permissions, a single compromised user can escalate the impact across the organization’s file sharing environment. This is particularly concerning for organizations handling sensitive or regulated data, such as those in finance, healthcare, or government sectors within Europe. The lack of user permission controls increases the risk of insider threats or lateral movement. Availability impact is limited but could occur if malicious scripts disrupt normal application use. The medium CVSS score reflects these moderate impacts combined with the need for user interaction and authentication. Organizations relying on Gokapi for secure file sharing should consider this vulnerability a notable risk, especially in multi-user deployments.
Mitigation Recommendations
1. Upgrade to Gokapi version 2.0.0 or later immediately, as this version fixes the vulnerability and introduces user permission controls. 2. If upgrading is not immediately possible, disable end-to-end encryption as a temporary workaround to mitigate the XSS attack vector. 3. Implement strict input validation and output encoding on all user-supplied data, especially filenames, to prevent script injection. 4. Restrict authentication to trusted users only and monitor for unusual activity that could indicate exploitation attempts. 5. Educate users to be cautious when interacting with file lists and uploaded content, especially if unexpected behavior is observed. 6. Employ Content Security Policy (CSP) headers to limit the impact of any injected scripts. 7. Regularly audit and review user permissions and encryption key management to minimize exposure. 8. Monitor vendor advisories and threat intelligence feeds for any emerging exploit attempts or patches.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-05-22T12:11:39.122Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 683d94ca182aa0cae24279eb
Added to database: 6/2/2025, 12:10:50 PM
Last enriched: 7/9/2025, 12:42:55 PM
Last updated: 7/13/2025, 2:35:06 PM
Views: 7
Related Threats
CVE-2025-7607: SQL Injection in code-projects Simple Shopping Cart
MediumCVE-2025-7606: SQL Injection in code-projects AVL Rooms
MediumCVE-2025-7597: Stack-based Buffer Overflow in Tenda AX1803
HighCVE-2025-7605: SQL Injection in code-projects AVL Rooms
MediumCVE-2025-7604: SQL Injection in PHPGurukul Hospital Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.