The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-5138

CVE-2025-5138: Bitwarden XSS Vulnerability

CVE-2025-5138 is a cross-site scripting flaw in Bitwarden up to version 2.25.1 affecting the PDF File Handler component. This post covers the technical details, affected versions, security impact, and mitigation steps.

Updated: January 22, 2026

CVE-2025-5138 Overview

A Cross-Site Scripting (XSS) vulnerability has been identified in Bitwarden password manager affecting versions up to 2.25.1. The vulnerability exists in the PDF File Handler component, where improper input sanitization allows attackers to inject malicious scripts through manipulated PDF files. This flaw can be exploited remotely by authenticated users to execute arbitrary JavaScript in the context of the victim's browser session.

Critical Impact

Authenticated attackers can exploit the PDF file upload functionality to execute cross-site scripting attacks, potentially leading to session hijacking, credential theft, or unauthorized actions within the Bitwarden vault context.

Affected Products

  • Bitwarden up to version 2.25.1
  • Bitwarden PDF File Handler component

Discovery Timeline

  • 2025-05-25 - CVE-2025-5138 published to NVD
  • 2025-06-20 - Last updated in NVD database

Technical Details for CVE-2025-5138

Vulnerability Analysis

This vulnerability falls under CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting. The flaw resides in how Bitwarden processes and renders PDF file attachments uploaded through its file handling functionality.

When a user uploads a PDF file containing embedded JavaScript or malicious content, the application fails to properly sanitize or neutralize the potentially dangerous input before rendering it to other users. This creates an opportunity for stored XSS attacks where the malicious payload persists within the application and executes when other users interact with the compromised file attachment.

The attack requires network access and a low-privileged authenticated account to upload the malicious PDF. User interaction is necessary for successful exploitation—a victim must view or interact with the uploaded PDF for the payload to execute in their browser context.

It's important to note that the real existence of this vulnerability is still disputed, and the vendor was contacted but did not respond to the disclosure.

Root Cause

The root cause stems from insufficient input validation and output encoding in the PDF File Handler component. When processing uploaded PDF files, the application does not adequately sanitize embedded JavaScript or HTML content that can be executed when the file is rendered or previewed within the browser context.

The lack of proper Content Security Policy (CSP) headers or sanitization routines allows embedded scripts within PDF documents to execute with the same origin privileges as the Bitwarden application itself.

Attack Vector

The attack leverages the network-accessible file upload functionality within Bitwarden. An authenticated attacker can craft a malicious PDF file containing embedded XSS payloads and upload it as an attachment. The attack sequence typically follows this pattern:

  1. Attacker authenticates to Bitwarden with a valid account
  2. Attacker crafts a PDF file containing embedded JavaScript payload
  3. Attacker uploads the malicious PDF through the file attachment feature
  4. When a victim views or interacts with the PDF, the embedded script executes
  5. The malicious script can then steal session tokens, modify vault entries, or perform other unauthorized actions

For technical details on the exploitation methodology, refer to the GitHub PoC Repository.

Detection Methods for CVE-2025-5138

Indicators of Compromise

  • Unusual PDF file uploads containing embedded JavaScript or HTML tags within metadata or document streams
  • Web application logs showing suspicious PDF file access patterns followed by unexpected JavaScript execution
  • Browser console errors or security violations related to PDF rendering in Bitwarden contexts
  • Anomalous session activity following user interaction with PDF attachments

Detection Strategies

  • Monitor file upload requests to identify PDF files with embedded script content or suspicious metadata
  • Implement Content Security Policy (CSP) violation logging to detect attempted XSS payload execution
  • Deploy web application firewall (WAF) rules to inspect PDF uploads for malicious embedded content
  • Review authentication logs for session anomalies following PDF file interactions

Monitoring Recommendations

  • Enable verbose logging for the Bitwarden file handler component to capture all PDF upload and access events
  • Configure SentinelOne Singularity platform to monitor for browser-based script injection attempts
  • Implement file integrity monitoring for uploaded attachments in the Bitwarden storage backend
  • Set up alerting for multiple failed or suspicious file upload attempts from single accounts

How to Mitigate CVE-2025-5138

Immediate Actions Required

  • Review and restrict PDF file upload capabilities to trusted users only
  • Implement strict Content Security Policy (CSP) headers to prevent inline script execution
  • Enable file type validation that inspects actual file content rather than just file extensions
  • Consider temporarily disabling PDF preview functionality until a patch is available

Patch Information

At the time of this writing, the vendor has not responded to the disclosure and no official patch has been released. Organizations should monitor the official Bitwarden security advisories and release notes for updates addressing this vulnerability.

For additional vulnerability intelligence, refer to VulDB #310219 which tracks this issue.

Workarounds

  • Configure the application to serve PDF files with Content-Disposition: attachment headers to force downloads rather than inline rendering
  • Implement server-side PDF sanitization using libraries that strip JavaScript and embedded objects from uploaded files
  • Deploy a reverse proxy or WAF with rules to scan uploaded PDF content for malicious payloads
  • Restrict file attachment functionality through organizational policies until an official fix is available
bash
# Example: Configure Content-Disposition header in nginx
location /attachments/ {
    add_header Content-Disposition "attachment" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header Content-Security-Policy "script-src 'none'" always;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechBitwarden

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub PoC Repository

  • VulDB CTI ID #310219

  • VulDB #310219

  • VulDB Submission #572263
  • Related CVEs
  • CVE-2023-27706: Bitwarden Information Disclosure Flaw
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English