CVE-2026-49342
Received Received - Intake
Path Traversal in YARD Documentation Tool

Publication date: 2026-06-19

Last updated on: 2026-06-19

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-19
Last Modified
2026-06-19
Generated
2026-06-21
AI Q&A
2026-06-19
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
lsegal yard to 0.9.44 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in YARD, a documentation generation tool for Ruby. Before version 0.9.44, YARD's static cache lookup reads the requested path before the router cleans it up. If the server is set with a document root, an attacker can craft a path with directory traversal sequences like '/../yard-cache-secret.html' which allows access to .html files outside the intended directory. This means the server can return contents of files that should not be accessible.

Impact Analysis

The vulnerability can lead to information disclosure by allowing an attacker to read arbitrary .html files outside the configured document root. This could expose sensitive HTML content that was not meant to be publicly accessible. The severity is rated as Moderate with a CVSS score of 5.3.

Detection Guidance

This vulnerability can be detected by attempting to access files outside the intended document root using crafted traversal paths in requests, such as '/../yard-cache-secret.html'. If the server returns the contents of such files, it indicates the presence of the vulnerability.

You can test this by sending HTTP requests to the YARD documentation server with traversal sequences in the URL path and observing if files outside the document root are accessible.

  • Use curl to send a request with a traversal path: curl -v http://<server_address>/../yard-cache-secret.html
  • Monitor server logs for requests containing '/../' or other directory traversal patterns.
Mitigation Strategies

The immediate mitigation step is to upgrade YARD to version 0.9.44 or later, where the vulnerability has been patched.

The patch sanitizes request paths by rejecting those containing '..' components and normalizing paths to prevent directory traversal.

Until the upgrade can be applied, consider restricting access to the YARD documentation server to trusted networks or users to reduce exposure.

Compliance Impact

This vulnerability allows an attacker to read arbitrary .html files outside the intended document root, potentially disclosing sensitive information contained in those files.

Such unauthorized information disclosure could lead to non-compliance with data protection regulations like GDPR or HIPAA if the exposed files contain personal or sensitive data protected under these standards.

Therefore, organizations using vulnerable versions of YARD may face increased risk of violating confidentiality requirements mandated by these regulations.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-49342. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart