CVE-2026-49342 YARD static cache reads raw traversal paths before router sanitization

Medium 5.3 Published Updated

Attackers can read arbitrary HTML files outside the intended directory if YARD is configured with a document root, due to premature path resolution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-49342?

CVE-2026-49342 is a medium-severity path traversal vulnerability in lsegal yard, published on 19 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

YARD is a documentation generation tool for the Ruby programming language. Prior to version 0.9.44, YARD's static cache lookup reads a request path before the router's path cleanup runs. When a server is configured with a document root, a traversal path such as `/../yard-cache-secret.html` is joined against that root and can return a readable sibling `.html` file outside the intended static tree. Version 0.9.44 patches the issue.

Weakness: CWE-22

Which versions are affected by CVE-2026-49342?

2 open source packages ship an affected version, including yard.

PackageAffectedFixed in
yard RubyGemsAll versions0.9.44
yard RubyGemsAll versions0.9.44

How do I fix CVE-2026-49342?

Upgrade yard to 0.9.44 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-49342 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49342 exists.

Sources

Also known as DEBIAN-CVE-2026-49342, GHSA-pxcc-8665-phx8, OESA-2026-2851, OESA-2026-2852, UBUNTU-CVE-2026-49342.

Is CVE-2026-49342 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free