CVE-2026-41493: yard Path Traversal Vulnerability
MODERATECVE-2026-41493 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting yard libraries in the RubyGems ecosystem. The issue involves possible arbitrary path traversal and file access via yard server. Remediation is available by upgrading affected packages to version 0.9.42.
CVE-2026-41493 at a Glance
How to Fix CVE-2026-41493
To remediate this vulnerability, upgrade all affected yard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade yard to 0.9.42
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for yard
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-41493, inspect your project dependencies for yard:
inspect dependencies for yard
Analyze the terminal output to locate any version of yard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.42), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In yard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41493 Affected yard Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
yard
|
RubyGems |
< 0.9.42
|
0.9.42
|
References
Frequently Asked Questions
What is CVE-2026-41493?
Which yard versions are affected?
What version fixes CVE-2026-41493?
Is yard affected?
What CWE is associated with CVE-2026-41493?
How can I check RubyGems dependencies for CVE-2026-41493?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3jfp-46x4-xgfj",
"modified" : "2026-06-09T10:55:28Z",
"published" : "2026-04-17T22:21:03Z",
"aliases" : [ "CVE-2026-41493" ],
"summary" : "yard: Possible arbitrary path traversal and file access via yard server",
"details" : "### Impact\n\nA path traversal vulnerability was discovered in YARD <= 0.9.41 when using yard server to serve documentation. This bug would allow unsanitized HTTP requests to access arbitrary files on the machine of a yard server host under certain conditions.\n\nThe original patch in [GHSA-xfhh-rx56-rxcr](https://github.com/lsegal/yard/security/advisories/GHSA-xfhh-rx56-rxcr) was incorrectly applied.\n\n### Patches\n\nPlease upgrade to YARD v0.9.42 immediately if you are relying on yard server to host documentation in any untrusted environments without WEBrick and rely on `--docroot`.\n\n### Workarounds\n\nFor users who cannot upgrade, it is possible to perform path sanitization of HTTP requests at your webserver level. WEBrick, for example, can perform such sanitization by default (which you can use via yard server -s webrick), as can certain rules in your webserver configuration.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "yard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.42"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lsegal/yard/security/advisories/GHSA-3jfp-46x4-xgfj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41493"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lsegal/yard"
}, {
"type" : "WEB",
"url" : "https://github.com/lsegal/yard/releases/tag/v0.9.42"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yard/CVE-2026-41493.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-17T22:21:03Z",
"nvd_published_at" : "2026-05-08T14:16:33Z"
}
}