Vulnerabilities in pkg:golang/github.com/cyphar/filepath-securejoin
PACKAGEGHSA-6xv5-86q9-7xr8 is a MODERATE on windows, paths outside of vulnerability (General Security Weakness) affecting SecureJoin libraries in the Go ecosystem. The issue involves on windows, paths outside of the rootfs could be inadvertently produced. Remediation is available by upgrading affected packages to version 0.2.4.
pkg:golang/github.com/cyphar/filepath-securejoin
Vulnerability advisories affecting package pkg:golang/github.com/cyphar/filepath-securejoin. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6xv5-86q9-7xr8 | - | MODERATE | SecureJoin: on windows, paths outside of the rootfs could be inadvertently produced |
GHSA-6xv5-86q9-7xr8 at a Glance
How to Fix GHSA-6xv5-86q9-7xr8
To remediate this vulnerability, upgrade all affected SecureJoin 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 github.com/cyphar/filepath-securejoin to 0.2.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cyphar/filepath-securejoin
How to Check if You Are Affected
To determine whether your application is affected by GHSA-6xv5-86q9-7xr8, inspect your project dependencies for SecureJoin:
inspect dependencies for github.com/cyphar/filepath-securejoin
Analyze the terminal output to locate any version of SecureJoin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.4), 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 General Security Weakness. In SecureJoin, 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
GHSA-6xv5-86q9-7xr8 Affected SecureJoin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cyphar/filepath-securejoin
|
Go |
< 0.2.4
|
0.2.4
|
References
Frequently Asked Questions
What is GHSA-6xv5-86q9-7xr8?
Which SecureJoin versions are affected?
What version fixes GHSA-6xv5-86q9-7xr8?
Is github.com/cyphar/filepath-securejoin affected?
What CWE is associated with GHSA-6xv5-86q9-7xr8?
How can I check Go dependencies for GHSA-6xv5-86q9-7xr8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6xv5-86q9-7xr8",
"modified" : "2023-09-07T12:58:58Z",
"published" : "2023-09-07T12:58:58Z",
"aliases" : [ ],
"summary" : "SecureJoin: on windows, paths outside of the rootfs could be inadvertently produced",
"details" : "### Impact\nFor Windows users of `github.com/cyphar/filepath-securejoin`, until v0.2.4 it was possible for certain rootfs and path combinations (in particular, where a malicious Unix-style `/`-separated unsafe path was used with a Windows-style rootfs path) to result in generated paths that were outside of the provided rootfs.\n\nIt is unclear to what extent this has a practical impact on real users, but given the possible severity of the issue we have released an emergency patch release that resolves this issue.\n\nThanks to @pjbgf for discovering, debugging, and fixing this issue (as well as writing some tests for it).\n\n### Patches\nc121231e1276e11049547bee5ce68d5a2cfe2d9b is the patch fixing this issue. v0.2.4 contains the fix.\n\n### Workarounds\nUsers could use `filepath.FromSlash()` on all unsafe paths before passing them to `filepath-securejoin`.\n\n### References\nSee #9.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cyphar/filepath-securejoin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cyphar/filepath-securejoin/security/advisories/GHSA-6xv5-86q9-7xr8"
}, {
"type" : "WEB",
"url" : "https://github.com/cyphar/filepath-securejoin/pull/9"
}, {
"type" : "WEB",
"url" : "https://github.com/cyphar/filepath-securejoin/commit/c121231e1276e11049547bee5ce68d5a2cfe2d9b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cyphar/filepath-securejoin"
}, {
"type" : "WEB",
"url" : "https://github.com/cyphar/filepath-securejoin/releases/tag/v0.2.4"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-07T12:58:58Z",
"nvd_published_at" : null
}
}