Arbitrary Path Traversal Vulnerability in YARD Package

yard Updated 18 Apr 2026

Summary

17/04/2026
MODERATE
Yes i
Moderate
6.9

GHSA-3jfp-46x4-xgfj: yard: Possible arbitrary path traversal and file access via yard server. Affects yard versions < 0.9.42. Fixed in 0.9.42. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

YARD is a documentation generation tool for Ruby that allows developers to create and serve documentation for their codebases. It is widely used in the Ruby community for its ability to generate clear and comprehensive documentation. However, versions of YARD up to 0.9.41 contain a vulnerability that can lead to arbitrary file access when using the yard server feature, particularly in untrusted environments.

Vulnerability Detail

A path traversal vulnerability was identified in YARD versions 0.9.41 and earlier. This vulnerability arises from the improper handling of unsanitized HTTP requests, which can allow an attacker to access arbitrary files on the server hosting the yard server. The issue was due to an incorrectly applied patch from a previous advisory, making it critical for users to be aware of the potential risks associated with serving documentation using YARD in insecure environments.

How To Fix

Minimum fixed version

0.9.42

This is the first release that contains the fix.

gem install yard -v 0.9.42

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not feasible, users can implement path sanitization at the web server level. For instance, if using WEBrick, you can run the yard server with the following command to enable default sanitization: 'yard server -s webrick'. Additionally, you may configure your web server to enforce strict rules regarding file access.

Conclusion

The path traversal vulnerability in YARD versions up to 0.9.41 poses a significant risk for users relying on the yard server feature. It is crucial to upgrade to version 0.9.42 or implement appropriate workarounds to safeguard your documentation and server environment. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for yard →

Share this vulnerability

FAQ

A path traversal vulnerability allows an attacker to access files and directories that are stored outside the intended directory, potentially exposing sensitive information.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any signup.

Failing to address this vulnerability could lead to unauthorized access to sensitive files on your server, potentially compromising your application and its data.

Yes, you can implement path sanitization at your web server level to mitigate the risk until you are able to upgrade to a secure version.

The CVSS score for this vulnerability is 6.9, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for yard.

How To Fix

Minimum fixed version

0.9.42

This is the first release that contains the fix.

gem install yard -v 0.9.42

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback