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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-34341

CVE-2024-34341: Trix Editor RCE Vulnerability

CVE-2024-34341 is a remote code execution flaw in Trix Editor that allows attackers to execute malicious scripts through pasted content. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2024-34341 Overview

CVE-2024-34341 is a Cross-Site Scripting (XSS) vulnerability affecting Trix, a popular rich text editor developed by Basecamp. The vulnerability allows arbitrary code execution when users copy and paste content from external web pages or documents containing malicious markup into the Trix editor. The flaw stems from improper sanitization of pasted HTML content, enabling attackers to embed malicious scripts that execute within the context of the application.

Critical Impact

Attackers can execute arbitrary JavaScript code in the context of affected applications, potentially leading to session hijacking, data theft, or unauthorized actions on behalf of authenticated users.

Affected Products

  • Trix Editor versions prior to 2.1.1
  • Applications integrating vulnerable Trix Editor versions
  • Ruby on Rails applications using Action Text with vulnerable Trix versions

Discovery Timeline

  • 2024-05-07 - CVE-2024-34341 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2024-34341

Vulnerability Analysis

This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting (XSS). The Trix editor failed to properly sanitize HTML content when users paste markup from external sources. Specifically, the parseTrixDataAttribute function in html_parser.js did not sanitize HTML content stored in Trix data attributes, and the HTMLSanitizer class did not include noscript elements in its list of forbidden tags.

The network-accessible attack vector requires user interaction (pasting content), but once triggered, malicious scripts execute with the privileges of the victim user. This can lead to unauthorized access to sensitive data and the ability to perform actions on behalf of the user.

Root Cause

The root cause involves two distinct sanitization failures in the Trix editor:

  1. Missing HTML sanitization in data attribute parsing: The parseTrixDataAttribute function in src/trix/models/html_parser.js parsed JSON data from Trix data attributes without sanitizing HTML content, allowing malicious markup to bypass security controls.

  2. Incomplete forbidden elements list: The HTMLSanitizer class in src/trix/models/html_sanitizer.js did not include noscript elements in its DEFAULT_FORBIDDEN_ELEMENTS array, enabling attackers to use this element as a vector for script injection.

Attack Vector

An attacker can exploit this vulnerability by crafting malicious HTML content containing embedded scripts or utilizing noscript elements to bypass the sanitizer. When a user copies this content from an attacker-controlled webpage and pastes it into a Trix editor instance, the malicious payload executes in the victim's browser context.

The attack is network-based and requires user interaction through the paste action. Successful exploitation could allow attackers to steal session cookies, redirect users to malicious sites, modify page content, or perform actions with the victim's credentials.

javascript
// Security patch in src/trix/models/html_parser.js - Merge pull request #1149 from basecamp/paste-html-sanitize
 
const parseTrixDataAttribute = (element, name) => {
  try {
-    return JSON.parse(element.getAttribute(`data-trix-${name}`))
+    const data = JSON.parse(element.getAttribute(`data-trix-${name}`))
+
+    if (data.contentType === "text/html" && data.content) {
+      data.content = HTMLSanitizer.sanitize(data.content).getHTML()
+    }
+
+    return data
  } catch (error) {
    return {}
  }

Source: GitHub Commit Update

javascript
// Security patch in src/trix/models/html_sanitizer.js - Merge pull request #1147 from basecamp/sanitize-noscript
 
const DEFAULT_ALLOWED_ATTRIBUTES = "style href src width height language class".split(" ")
const DEFAULT_FORBIDDEN_PROTOCOLS = "javascript:".split(" ")
-const DEFAULT_FORBIDDEN_ELEMENTS = "script iframe form".split(" ")
+const DEFAULT_FORBIDDEN_ELEMENTS = "script iframe form noscript".split(" ")
 
export default class HTMLSanitizer extends BasicObject {
  static sanitize(html, options) {

Source: GitHub Commit Fix

Detection Methods for CVE-2024-34341

Indicators of Compromise

  • Unexpected JavaScript execution originating from Trix editor instances
  • Presence of noscript tags in Trix editor content where none should exist
  • Suspicious data attributes containing unescaped HTML in editor elements
  • Client-side errors or unexpected DOM modifications when pasting content

Detection Strategies

  • Monitor web application logs for XSS-related events or Content Security Policy violations
  • Implement Content Security Policy (CSP) headers to detect and block inline script execution
  • Review application JavaScript for calls to vulnerable Trix versions (prior to 2.1.1)
  • Use browser developer tools to inspect Trix data attributes for unsanitized HTML content

Monitoring Recommendations

  • Enable verbose logging for client-side JavaScript errors in production environments
  • Configure web application firewalls (WAF) to detect XSS payloads in paste operations
  • Monitor for CSP violation reports that may indicate exploitation attempts
  • Set up alerts for unusual DOM manipulation patterns in rich text editor contexts

How to Mitigate CVE-2024-34341

Immediate Actions Required

  • Upgrade Trix editor to version 2.1.1 or later immediately
  • Review all applications using Trix editor to identify vulnerable deployments
  • Implement Content Security Policy headers to mitigate XSS impact
  • Audit recent user-submitted content for potential malicious payloads

Patch Information

Basecamp has released Trix version 2.1.1 which addresses this vulnerability. The fix includes proper sanitization of HTML content in the parseTrixDataAttribute function and adds noscript to the list of forbidden elements in the HTMLSanitizer class. Organizations should update to this version immediately.

For technical details, refer to:

  • GitHub Security Advisory GHSA-qjqp-xr96-cj99
  • GitHub Release v2.1.1
  • Pull Request #1147
  • Pull Request #1149

Workarounds

  • Implement server-side HTML sanitization as an additional layer of defense before storing user content
  • Deploy strict Content Security Policy headers to prevent inline script execution
  • Disable paste functionality in Trix editor if not required for business operations
  • Use a Web Application Firewall (WAF) configured to detect XSS payloads in request bodies
bash
# Configuration example - Content Security Policy header for Apache
# Add to .htaccess or Apache configuration
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self';"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechTrix

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.41%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Fix

  • GitHub Pull Request #1147

  • GitHub Pull Request #1149

  • GitHub Release v2.1.1

  • GitHub Security Advisory GHSA-qjqp-xr96-cj99
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | 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