6.9medium
yard: Possible arbitrary path traversal and file access via yard server
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.39% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-3jfp-46x4-xgfj
Description
YARD is a Ruby Documentation tool. Prior to version 0.9.42, a path traversal vulnerability was discovered in YARD when using yard server to serve documentation. This bug would allow unsanitized HTTP requests to access arbitrary files on the machine of a yard server host under certain conditions. This issue has been patched in version 0.9.42.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| lsegal yard | < 0.9.42 | CVE List |
| yard (RubyGems) | before 0.9.42 | GitHub Advisory Database |
| yardoc yard | before 0.9.42 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
YARD is a Ruby Documentation tool. Prior to version 0.9.42, a path traversal vulnerability was discovered in YARD when using yard server to serve documentation. This bug would allow unsanitized HTTP requests to access arbitrary files on the machine of a yard server host under certain conditions. This issue has been patched in version 0.9.42.
GitHub Advisory Database
Impact
A path traversal vulnerability was discovered in YARD <= 0.9.41 when using yard server to serve documentation. This bug would allow unsanitized HTTP requests to access arbitrary files on the machine of a yard server host under certain conditions.
The original patch in GHSA-xfhh-rx56-rxcr was incorrectly applied.
Patches
Please upgrade to YARD v0.9.42 immediately if you are relying on yard server to host documentation in any untrusted environments without WEBrick and rely on --docroot.
Workarounds
For users who cannot upgrade, it is possible to perform path sanitization of HTTP requests at your webserver level. WEBrick, for example, can perform such sanitization by default (which you can use via yard server -s webrick), as can certain rules in your webserver configuration.
NVD (es)
YARD es una herramienta de documentación de Ruby. Antes de la versión 0.9.42, se descubrió una vulnerabilidad de salto de ruta en YARD al usar el servidor de yard para servir documentación. Este error permitiría que solicitudes HTTP no saneadas accedieran a archivos arbitrarios en la máquina de un host del servidor de yard bajo ciertas condiciones. Este problema ha sido parcheado en la versión 0.9.42.
References
| https://github.com/lsegal/yard/security/advisories/GHSA-3jfp-46x4-xgfj | mitigation, vendor-advisory, web | |
| https://github.com/lsegal/yard/releases/tag/v0.9.42 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41493 | advisory | |
| https://github.com/lsegal/yard | package | |
| https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yard/CVE-2026-41493.yml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41493 changed 2026-05-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3jfp-46x4-xgfj changed 2026-06-09 | CC-BY-4.0 |
| NVD | CVE-2026-41493 changed 2026-10-26 | Public domain |