CVE-2026-41493
JSON

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 packageVersionsReported by
lsegal yard< 0.9.42CVE List
yard (RubyGems)before 0.9.42GitHub Advisory Database
yardoc yardbefore 0.9.42NVD

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-22

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

Sources

SourceRecordLicence
CVE ListCVE-2026-41493 changed 2026-05-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-3jfp-46x4-xgfj changed 2026-06-09CC-BY-4.0
NVDCVE-2026-41493 changed 2026-10-26Public domain