# CVE-2026-41493: lsegal YARD path traversal in yard server

Source: https://junglewise.ai/threats/cve-2026-41493-lsegal-yard-path-traversal-in-yard-server  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-08. Updated: 2026-05-29  
License: CC BY 4.0 with a link back

CVE-2026-41493 · Severity: high · CVSS 7.5 · Published 2026-05-08

YARD is a popular Ruby documentation tool used to generate and serve documentation for software projects. A security flaw in its built-in server component allows an attacker to bypass directory restrictions and access sensitive files on the host machine. This could lead to the exposure of private source code, configuration files, or other system data.

Technologies: [yard (RubyGems)](https://junglewise.ai/threats/technologies/yard). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-41493 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41493 being exploited in the wild.

**How severe is CVE-2026-41493?** High severity, with a CVSS score of 7.5, published 8 May 2026.

**Which products and versions are affected?** yard (RubyGems) < 0.9.42, ECOSYSTEM:introduced=0,fixed=0.9.42.

**Is there a fix for CVE-2026-41493?** Yes. yard (RubyGems): upgrade to 0.9.42 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-41493 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-41493?** Check whether you run yard (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- yard (RubyGems): upgrade to 0.9.42 or later

  ```sh
  bundle update yard
  ```


## Technical details

A path traversal vulnerability (CWE-22) exists in the YARD documentation server when the `--docroot` option is utilized. The vulnerability stems from an incorrectly applied patch for a previous security issue (GHSA-xfhh-rx56-rxcr), which fails to properly sanitize HTTP request paths. A remote, unauthenticated attacker can send specially crafted HTTP requests to escape the intended documentation directory and read arbitrary files on the host system. This vulnerability specifically affects environments where YARD is used as a standalone server without a protective middleware like WEBrick, which typically handles path sanitization. The issue is resolved in version 0.9.42.

## Affected products

- lsegal yard <= 0.9.41

## Identifiers

- CVE-2026-41493
- GHSA-3jfp-46x4-xgfj

## Timeline

- 2026-04-16: patched: Version 0.9.42 released
- 2026-04-17: advisory: GitHub Advisory GHSA-3jfp-46x4-xgfj published

## References

- [https://github.com/lsegal/yard/security/advisories/GHSA-3jfp-46x4-xgfj](https://github.com/lsegal/yard/security/advisories/GHSA-3jfp-46x4-xgfj)
- [https://github.com/lsegal/yard/releases/tag/v0.9.42](https://github.com/lsegal/yard/releases/tag/v0.9.42)
- [https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yard/CVE-2026-41493.yml](https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yard/CVE-2026-41493.yml)
- [https://api.github.com/repos/lsegal/yard/security-advisories/GHSA-3jfp-46x4-xgfj](https://api.github.com/repos/lsegal/yard/security-advisories/GHSA-3jfp-46x4-xgfj)

## Related threats

- [lsegal YARD path traversal in StaticCaching](https://junglewise.ai/threats/cve-2026-49342-lsegal-yard-path-traversal-in-staticcaching)
- [YARD's default template vulnerable to Cross-site Scripting in generated frames.html](https://junglewise.ai/threats/cve-2024-27285-yard-s-default-template-vulnerable-to-cross-site-scripting-in)
- [Path Traversal vulnerability that affects yard](https://junglewise.ai/threats/cve-2019-1020001-path-traversal-vulnerability-that-affects-yard)
- [Arbitrary file read vulnerability in yard server](https://junglewise.ai/threats/cve-2017-17042-arbitrary-file-read-vulnerability-in-yard-server)
