A critical vulnerability in Bitwarden’s PDF File Handler has exposed millions of users to potential account compromise through malicious document uploads, security researchers disclosed in May 2025. The cross-site scripting (XSS) flaw, designated CVE-2025-5138, affects all Bitwarden versions up to 2.25.1, allowing attackers to execute arbitrary JavaScript code within the password manager’s web interface.
The vulnerability exploits weak file type restrictions and insufficient input validation in Bitwarden’s PDF processing system. Attackers can upload specially crafted PDF files containing embedded JavaScript through the platform’s Resources upload feature, which then execute when unsuspecting users preview or open these malicious documents. Organizations utilizing multi-factor authentication can significantly reduce their exposure to such vulnerabilities.
The attack utilizes improper neutralization of user-controllable input, classified under CWE-79, permitting code injection within web page output. Security experts note that successful exploitation requires authenticated access and user interaction, limiting mass exploitation scenarios whereas allowing targeted attacks. When triggered, the DOM-based XSS executes within the Bitwarden domain context, providing attackers access to active user sessions.
This capability facilitates account hijacking through session token capture, unauthorized vault access, and potential credential theft from compromised accounts. The vulnerability carries CVSS v3.1 base scores ranging from 3.5 to 5.1, reflecting low to medium severity depending on assessment criteria. The Exploit Prediction Scoring System indicates a 0.03% likelihood of exploitation within 30 days, though public disclosure may increase attack probability.
Security databases classify the flaw as “problematic” rather than “critical,” yet the potential impact remains significant given Bitwarden’s widespread adoption. Particularly concerning for enterprise environments, successful exploitation could promote lateral movement within organizations managing shared credentials through Bitwarden instances. The attack vector proves especially effective on Google Chrome browsers, where PDF preview functionality increases exposure risk. The remote exploitation potential significantly elevates the threat level since attackers can launch attacks from anywhere without requiring physical access to target systems. Analysts emphasize that the vulnerability is easy to execute, making it accessible to attackers with limited technical expertise.
As of late May 2025, Bitwarden has not acknowledged the vulnerability or provided official mitigation guidance, even with early researcher notification. Security professionals recommend users avoid previewing unfamiliar PDFs within the Bitwarden platform until patches become available. Organizations should implement additional monitoring for unusual file uploads and consider restricting PDF access through corporate Bitwarden deployments until vendor remediation occurs.