Vulnerability · Published Feb 28, 2024 · Assigned by GitHub_M
CVE-2024-27285YARD's default template vulnerable to Cross-site Scripting in generated frames.html
Medium 5.4
In plain English
A medium-severity cross-site scripting in yard from lsegal. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)1.1%top 35.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | yard | 0.9.28-2+deb12u2 | DEBIAN-CVE-2024-27285 |
| Debian:12 | yard | 0.9.28-2+deb12u2 | DSA-5635-1 |
| Debian:13 | yard | 0.9.36-1 | DEBIAN-CVE-2024-27285 |
| Debian:14 | yard | 0.9.36-1 | DEBIAN-CVE-2024-27285 |
| RubyGems | yard | 0.9.36 | GHSA-8mq4-9jjh-9xrc |
| Ubuntu:22.04:LTS | yard | 0.9.26-1ubuntu0.1 | USN-6731-1 |
| Ubuntu:22.04:LTS | yard | 0.9.26-1ubuntu0.1 | UBUNTU-CVE-2024-27285 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
References
- https://github.com/lsegal/yard/security/advisories/GHSA-8mq4-9jjh-9xrc x_refsource_CONFIRM
- https://github.com/lsegal/yard/pull/1538 x_refsource_MISC
- https://github.com/lsegal/yard/commit/1fcb2d8b316caf8779cfdcf910715e9ab583f0aa x_refsource_MISC
- https://github.com/lsegal/yard/commit/2069e2bf08293bda2fcc78f7d0698af6354054be x_refsource_MISC
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yard/CVE-2024-27285.yml x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2024/03/msg00006.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MR3Z2E2UIZZ7YOR7R645EVSBGWMB2RGA/