CVE-2018-25059: Github.com/jessfraz/pastebinit Path Traversal Vulnerability
MODERATECVE-2018-25059 is a MODERATE (CVSS 5.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/jessfraz/pastebinit libraries in the Go ecosystem. The issue involves pastebinit path traversal vulnerability. Remediation is available by upgrading affected packages to version 0.2.3.
CVE-2018-25059 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2018-25059
To remediate this vulnerability, upgrade all affected Github.com/jessfraz/pastebinit 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/jessfraz/pastebinit to 0.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/jessfraz/pastebinit
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-25059, inspect your project dependencies for Github.com/jessfraz/pastebinit:
inspect dependencies for github.com/jessfraz/pastebinit
Analyze the terminal output to locate any version of Github.com/jessfraz/pastebinit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), 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 Github.com/jessfraz/pastebinit, 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-2018-25059 Affected Github.com/jessfraz/pastebinit Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/jessfraz/pastebinit
|
Go |
< 0.2.3
|
0.2.3
|
References
Frequently Asked Questions
What is CVE-2018-25059?
Which Github.com/jessfraz/pastebinit versions are affected?
What version fixes CVE-2018-25059?
Is github.com/jessfraz/pastebinit affected?
What is the CVSS score of CVE-2018-25059?
What CWE is associated with CVE-2018-25059?
How can I check Go dependencies for CVE-2018-25059?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cwh7-28vg-jmpr",
"modified" : "2023-01-10T16:12:39Z",
"published" : "2022-12-30T12:30:25Z",
"aliases" : [ "CVE-2018-25059" ],
"summary" : "pastebinit Path Traversal vulnerability",
"details" : "A vulnerability was found in pastebinit up to 0.2.2 and classified as problematic. Affected by this issue is the function pasteHandler of the file server.go. The manipulation of the argument `r.URL.Path` leads to path traversal. Upgrading to version 0.2.3 can address this issue. The name of the patch is 1af2facb6d95976c532b7f8f82747d454a092272. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-217040.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/jessfraz/pastebinit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-25059"
}, {
"type" : "WEB",
"url" : "https://github.com/jessfraz/pastebinit/pull/3"
}, {
"type" : "WEB",
"url" : "https://github.com/jessfraz/pastebinit/commit/1af2facb6d95976c532b7f8f82747d454a092272"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jessfraz/pastebinit"
}, {
"type" : "WEB",
"url" : "https://github.com/jessfraz/pastebinit/releases/tag/v0.2.3"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.217040"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.217040"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-03T12:28:42Z",
"nvd_published_at" : "2022-12-30T11:15:00Z"
}
}