PT-2024-21793 · Yard+4 · Yard+4
Avivkeller
·
Published
2024-02-28
·
Updated
2025-02-14
·
CVE-2024-27285
CVSS v3.1
6.1
Medium
| Vector | AV: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.Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Astra Linux
Linuxmint
Red Os
Ubuntu
Yard