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

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.