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

VectorAV: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

Weakness Enumeration

Related Identifiers

CVE-2024-27285
DLA-3753-1
DSA-5635-1
GHSA-8MQ4-9JJH-9XRC
OESA-2024-1256
USN-6731-1

Affected Products

Astra Linux
Linuxmint
Red Os
Ubuntu
Yard