Vulnerability DatabaseGHSA-52c5-vh7f-26fx

GHSA-52c5-vh7f-26fx
Ruby vulnerability analysis and mitigation

Overview

The prosemirror_to_html gem contains a Cross-Site Scripting (XSS) vulnerability (GHSA-52c5-vh7f-26fx) discovered and disclosed on November 6, 2025. The vulnerability affects versions prior to 0.2.1 and allows attackers to inject arbitrary JavaScript code through unescaped HTML attribute values. While the gem properly escapes tag content, it fails to sanitize attribute values, creating a potential security risk for applications converting ProseMirror documents to HTML (GitHub Advisory).

Technical details

The vulnerability exists in the Renderer.render_opening_tag function within lib/prosemirror_to_html.rb, where HTML attribute values are directly concatenated into the output string without proper sanitization. The issue has been assigned a CVSS score of 7.6 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N, indicating network attack vector, low attack complexity, low privileges required, and user interaction required. The vulnerability is classified as CWE-79: Improper Neutralization of Input During Web Page Generation (GitHub Advisory).

Impact

The vulnerability impacts any application using prosemirror_to_html to convert ProseMirror documents to HTML, with applications processing user-generated ProseMirror content at highest risk. Attack vectors include malicious javascript: protocol in href attributes, event handlers, onerror attributes on images, and other HTML attributes capable of executing JavaScript. End users viewing the rendered HTML output could have malicious JavaScript executed in their browsers (GitHub Advisory).

Exploitability

The vulnerability can be exploited through malicious HTML attribute values, particularly in applications that process user-generated ProseMirror content. The attack requires low complexity and privileges but does need user interaction. The vulnerability allows attackers to inject arbitrary JavaScript code through various HTML attributes (GitHub Advisory).

Mitigation and workarounds

A fix has been released in version 0.2.1, which implements proper escaping of HTML attribute values using CGI.escapeHTML. Until upgrading is possible, several workarounds are available: 1) Sanitize output using libraries like Sanitize or Loofah, 2) Implement Content Security Policy (CSP) headers to prevent inline JavaScript execution, 3) Validate and sanitize ProseMirror documents before conversion. The recommended solution is to upgrade to version 0.2.1 or later (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-55107CRITICAL10
  • Ruby logoRuby
  • kobako
NoYesAug 18, 2026
CVE-2026-61666HIGH8.9
  • Ruby logoRuby
  • websocket-driver
NoYesAug 17, 2026
CVE-2026-73648MEDIUM5.1
  • Ruby logoRuby
  • ruby3.4-rails-8.1
NoYesAug 13, 2026
CVE-2026-73426MEDIUM4.6
  • JavaScript logoJavaScript
  • action_text-trix
NoYesAug 18, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • action_text-trix
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management