# CVE-2026-49342: lsegal YARD path traversal in StaticCaching

Source: https://junglewise.ai/threats/cve-2026-49342-lsegal-yard-path-traversal-in-staticcaching  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-19. Updated: 2026-06-26  
License: CC BY 4.0 with a link back

CVE-2026-49342 · Severity: medium · CVSS 5.3 · Published 2026-06-19

YARD is a documentation generation tool for Ruby that includes a local server for viewing documentation. A security flaw in its static file caching mechanism allows an attacker to view HTML files on the server that are outside of the intended documentation folder. This could lead to the exposure of sensitive information if other HTML files are stored on the same system.

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

## Quick answers

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

**How severe is CVE-2026-49342?** Medium severity, with a CVSS score of 5.3, published 19 June 2026.

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

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

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

**Am I affected by CVE-2026-49342?** 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.44 or later

  ```sh
  bundle update yard
  ```


## Technical details

A path traversal vulnerability exists in YARD's `check_static_cache` method within the `Router` class. When the `--docroot` option is enabled, the server joins the user-provided request path with the document root using `File.join` before performing path sanitization. An unauthenticated remote attacker can use `..` sequences to escape the document root and read any file ending in `.html` that the server process has permission to access. This occurs because the static cache check returns a response before the `final_options` sanitization logic is executed. The issue is fixed in version 0.9.44.

## Affected products

- lsegal yard < 0.9.44

## Identifiers

- CVE-2026-49342
- GHSA-pxcc-8665-phx8

## Timeline

- 2026-05-25: disclosed
- 2026-06-19: advisory: NVD publication date
- 2026-06-26: patched: GitHub Advisory reviewed and updated

## References

- [https://api.github.com/users/hibrian827](https://api.github.com/users/hibrian827)
- [https://github.com/hibrian827](https://github.com/hibrian827)
- [https://api.github.com/users/hibrian827/gists%7B/gist_id%7D](https://api.github.com/users/hibrian827/gists%7B/gist_id%7D)
- [https://api.github.com/users/hibrian827/repos](https://api.github.com/users/hibrian827/repos)
- [https://avatars.githubusercontent.com/u/48850892?v=4](https://avatars.githubusercontent.com/u/48850892?v=4)
- [https://api.github.com/users/hibrian827/events%7B/privacy%7D](https://api.github.com/users/hibrian827/events%7B/privacy%7D)

## Related threats

- [lsegal YARD path traversal in yard server](https://junglewise.ai/threats/cve-2026-41493-lsegal-yard-path-traversal-in-yard-server)
- [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)
