PT-2024-21793
CVE-2024-27285
·
Published
2024-02-28
·
Updated
2025-02-14
Description by
CVSS 3.1
6.1
MediumMetricsAV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions
YARD versions prior to 0.9.36
Description
The "frames.html" file within the Yard Doc's generated documentation is vulnerable to Cross-Site Scripting (XSS) attacks due to inadequate sanitization of user input within the JavaScript segment of the "frames.erb" template file. This vulnerability stems from mishandling user-controlled data retrieved from the URL hash in the embedded JavaScript code within the "frames.erb" template file. The script lacks proper sanitization of the hash data before utilizing it to establish the top-level window's location, permitting an attacker to inject malicious JavaScript payloads through carefully crafted URLs.
Recommendations
For versions prior to 0.9.36, update to version 0.9.36 to fix the vulnerability. As a temporary workaround, consider disabling the JavaScript code within the "frames.erb" template file until a patch is available. Restrict access to the "frames.html" file to minimize the risk of exploitation. Avoid using the
window.location.hash variable in the affected JavaScript code until the issue is resolved.Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾