CVE-2024-27285 YARD's default template vulnerable to Cross-site Scripting in generated frames.html

Medium 5.4 Published Updated

YARD's default template allows Cross-Site Scripting via unsanitized input in generated frames.html, enabling attackers to execute scripts in users' browsers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-27285?

CVE-2024-27285 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 28 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

YARD is a Ruby Documentation tool. 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 is fixed in 0.9.36.

Weakness: CWE-79

Which versions are affected by CVE-2024-27285?

2 open source packages ship an affected version, including yard. It affects 3 products.

PackageAffectedFixed in
yard RubyGemsAll versions0.9.36
yard RubyGemsAll versions0.9.36

Products include Debian Debian Linux, Fedoraproject Fedora, Yardoc Yard.

How do I fix CVE-2024-27285?

Upgrade yard to 0.9.36 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-27285 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27285 exists.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2024-27285, DSA-5635-1, GHSA-8mq4-9jjh-9xrc, OESA-2024-1256, UBUNTU-CVE-2024-27285.

Is CVE-2024-27285 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free