CVE-2025-49590
Executive Summary
CVE-2025-49590 is a Cross-Site Scripting (XSS) vulnerability in the CryptPad collaboration suite, specifically within its "Link Bouncer" functionality. The flaw allows an attacker to bypass URI scheme filtering by exploiting an "early allow" code path that executes before the protocol/scheme check. This enables the injection of malicious JavaScript URIs, leading to potential session hijacking, data theft, or arbitrary actions on behalf of the victim. The vulnerability affects all versions prior to 2025.3.0. No public proof-of-concept (PoC) or exploit code is currently available, but the risk is significant due to the collaborative nature of CryptPad.
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
CryptPad is an open-source application typically self-hosted or used via the official instance. The vulnerability is in the application's own code, not in a third-party package. However, administrators should verify the integrity of their CryptPad installation and ensure they are running the patched version (2025.3.0 or later). No malicious packages have been reported in the supply chain.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability type (XSS via URI scheme bypass), a reasonable CVSS v3.1 vector would be:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N (Base Score: 6.1, Medium)
- Attack Vector (AV): Network – The attack is performed over the network.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – The attacker does not need authentication.
- User Interaction (UI): Required – The victim must click a crafted link.
- Scope (S): Changed – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure possible.
- Integrity (I): Low – Limited data modification possible.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the potential for social engineering and the collaborative context of CryptPad elevate the risk.
Deep Dive & Mechanics
The "Link Bouncer" in CryptPad is designed to sanitize user-provided links before redirecting users. It attempts to block dangerous URI schemes like javascript:, data:, and vbscript: to prevent XSS. However, the implementation has a logic flaw: an "early allow" code path exists that processes certain URIs before the scheme check is performed.
How the bypass works:
- The Link Bouncer receives a URI.
- It first checks if the URI matches certain "safe" patterns (e.g., starting with
http://orhttps://). This is the "early allow" path. - If the URI matches an early allow pattern, it is passed through without further scheme validation.
- An attacker can craft a URI that starts with a safe pattern but contains a malicious JavaScript payload. For example:
In some parsers, thehttp://example.com@javascript:alert(document.cookie)@symbol can be used to include credentials, and the part after@might be interpreted as a JavaScript URI by the browser.
Root Cause: The early allow logic does not perform a final scheme check after the URI is processed. This allows a URI that appears safe initially to be rendered as a dangerous javascript: URI in the browser.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Vulnerable Link Bouncer logic
function sanitizeLink(uri) {
// Early allow for common schemes
if (uri.startsWith('http://') || uri.startsWith('https://')) {
return uri; // No further checks!
}
// Block dangerous schemes
if (uri.startsWith('javascript:') || uri.startsWith('data:')) {
return '/blocked';
}
return uri;
}
Patched Code (Conceptual):
// Patched Link Bouncer logic
function sanitizeLink(uri) {
// Block dangerous schemes first
if (uri.startsWith('javascript:') || uri.startsWith('data:')) {
return '/blocked';
}
// Then allow safe schemes
if (uri.startsWith('http://') || uri.startsWith('https://')) {
return uri;
}
return '/blocked';
}
The fix ensures that dangerous scheme checks are performed before any early allow logic, preventing the bypass.
Exploitation & Lab Setup
Red Team
Objective: Demonstrate XSS via the Link Bouncer bypass.
Prerequisites:
- A CryptPad instance running a version prior to 2025.3.0.
- A victim user who will click a crafted link.
Steps:
Craft the malicious URI:
http://example.com@javascript:alert('XSS')Or, using URL encoding to evade filters:
http://example.com@%6A%61%76%61%73%63%72%69%70%74:alert('XSS')Deliver the link: Embed the URI in a CryptPad document, a chat message, or an email to the victim.
Trigger: When the victim clicks the link, the Link Bouncer processes it. The early allow path sees
http://and passes it through. The browser then interprets the part after@as ajavascript:URI, executing the script.
Expected Result: An alert box with "XSS" appears, demonstrating successful script execution.
Blue Team
Objective: Detect and block exploitation attempts.
Detection:
- Monitor web server logs for URIs containing
@javascript:or similar patterns. - Use the detection rules provided in the Detection Engineering section.
Mitigation:
- Immediately upgrade to CryptPad version 2025.3.0 or later.
- Implement a Web Application Firewall (WAF) rule to block URIs with suspicious patterns.
- Educate users about not clicking on suspicious links.
Indicators of Compromise (IOCs)
- Network IOCs:
- URIs containing
@javascript:or@data:in the path. - URIs with multiple
@symbols or unusual URL encoding.
- URIs containing
- Host IOCs:
- CryptPad logs showing blocked or suspicious link bouncer activity.
- Unexpected JavaScript execution in the browser console.
- File IOCs:
- None specific to this CVE.
Detection Engineering
YARA Rule
rule CVE_2025_49590_CryptPad_XSS {
meta:
description = "Detects attempts to exploit CVE-2025-49590 via malicious URIs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49590"
strings:
$uri_pattern1 = /http:\/\/[^\/]+@javascript:/ nocase
$uri_pattern2 = /http:\/\/[^\/]+@data:/ nocase
$uri_pattern3 = /https:\/\/[^\/]+@javascript:/ nocase
$uri_pattern4 = /https:\/\/[^\/]+@data:/ nocase
condition:
any of them
}
Sigma Rule
title: CryptPad Link Bouncer XSS Bypass
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests containing malicious URIs targeting CVE-2025-49590
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains:
- '@javascript:'
- '@data:'
condition: selection
falsepositives:
- Legitimate URIs with credentials (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-49590 CryptPad Link Bouncer XSS Bypass"; flow:to_server,established; content:"@javascript:"; http_uri; nocase; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2025-49590 CryptPad Link Bouncer XSS Bypass"; flow:to_server,established; content:"@data:"; http_uri; nocase; sid:1000002; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade CryptPad: Update to version 2025.3.0 or later. This is the only complete fix.
- Apply WAF Rules: Use the Suricata or custom WAF rules to block malicious URIs.
- Review Logs: Check for any signs of exploitation in web server logs.
Long-Term Measures:
- Implement a Content Security Policy (CSP) to restrict script execution.
- Conduct regular security audits of custom code.
- Monitor for new CVEs and apply patches promptly.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.