CVE-2024-27285
Ruby vulnerability analysis and mitigation

Overview

CVE-2024-27285 affects YARD, a Ruby Documentation tool. The vulnerability was discovered in the 'frames.html' file within the Yard Doc's generated documentation, which is susceptible to Cross-Site Scripting (XSS) attacks due to inadequate sanitization of user input within the JavaScript segment of the 'frames.erb' template file. The vulnerability was disclosed on February 28, 2024, and affects all versions prior to 0.9.36 (GitHub Advisory, NVD).

Technical details

The vulnerability stems from mishandling user-controlled data retrieved from the URL hash in the embedded JavaScript code within the 'frames.erb' template file. The CVSS v3.1 base score is 6.1 (Medium) according to NVD, with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). The issue specifically relates to inadequate sanitization of the hash data before it's used to establish the top-level window's location (GitHub Advisory).

Impact

The XSS vulnerability enables attackers to execute arbitrary JavaScript code within the user's session context. Potential consequences include session hijacking, theft of sensitive data, unauthorized access to user accounts, and website defacement. Any user visiting a compromised page generated by affected YARD versions is susceptible to exploitation (GitHub Advisory).

Exploitability

The vulnerability can be exploited by gaining access to the generated Yard Doc, locating the 'frames.html' file, and constructing a URL containing a malicious payload in the hash segment. For version 0.9.34, the exploit uses the format '#!javascript:xss', and for version 0.9.35, it uses '#:javascript:xss' (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in YARD version 0.9.36. Users are strongly advised to upgrade to this version or later. Multiple distributions have also released security updates, including Debian with version 0.9.16-1+deb10u1 for Debian 10 and Fedora with version 0.9.36-1.fc38 for Fedora 38 (Debian LTS, Fedora Update).

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-71847HIGH8.7
  • Ruby logoRuby
  • ruby3.2-rails-8.1
NoYesAug 07, 2026
CVE-2026-45414HIGH8.5
  • Ruby logoRuby
  • decidim
NoYesAug 06, 2026
CVE-2026-45573MEDIUM6.4
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 2026
CVE-2026-45415MEDIUM6
  • Ruby logoRuby
  • decidim-verifications
NoYesAug 06, 2026
CVE-2026-45572MEDIUM4.8
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 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