GHSA-p799-q2pr-6mxj: Go.rgst.io/stencil/v2 Path Traversal Vulnerability
MODERATEGHSA-p799-q2pr-6mxj is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Go.rgst.io/stencil/v2 libraries in the Go ecosystem. The issue involves go.rgst.io/stencil/v2 vulnerable to path traversal. Remediation is available by upgrading affected packages to version 2.3.0.
GHSA-p799-q2pr-6mxj at a Glance
How to Fix GHSA-p799-q2pr-6mxj
To remediate this vulnerability, upgrade all affected Go.rgst.io/stencil/v2 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 go.rgst.io/stencil/v2 to 2.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for go.rgst.io/stencil/v2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-p799-q2pr-6mxj, inspect your project dependencies for Go.rgst.io/stencil/v2:
inspect dependencies for go.rgst.io/stencil/v2
Analyze the terminal output to locate any version of Go.rgst.io/stencil/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), 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 Go.rgst.io/stencil/v2, 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-p799-q2pr-6mxj Affected Go.rgst.io/stencil/v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
go.rgst.io/stencil/v2
|
Go |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is GHSA-p799-q2pr-6mxj?
Which Go.rgst.io/stencil/v2 versions are affected?
What version fixes GHSA-p799-q2pr-6mxj?
Is go.rgst.io/stencil/v2 affected?
What CWE is associated with GHSA-p799-q2pr-6mxj?
How can I check Go dependencies for GHSA-p799-q2pr-6mxj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p799-q2pr-6mxj",
"modified" : "2025-03-29T00:08:44Z",
"published" : "2025-03-29T00:08:44Z",
"aliases" : [ ],
"summary" : "go.rgst.io/stencil/v2 vulnerable to Path Traversal",
"details" : "### Impact\n\nThe library used to extract archives (github.com/jaredallard/archives) was vulnerable to the \"zip slip\" vulnerability. This is used to extract native extension archives and repository source archives. A native extension or repository archive could be crafted in such a way where a remote code execution or modification/reading of a file is possible using the user who is running stencil.\n\nThe severity is marked as \"medium\" because native extensions have always considered to be \"unsafe\" to run when not trusted. Native extensions are arbitrary code being ran, which could always do this same exploit with less steps. The medium severity is to reflect that this could be done even when a user is _not_ using a native extension, for example a repository source archive. However, one would need to mutate the archives provided by Github or perform some hackery with links, which may not be possible. Thus, \"medium\" is used out of an abundance of caution where I would've labeled this as \"low\".\n\n### Patches\n\nPatched in 2.3.0 and above.\n\n### Workarounds\n\nNo workarounds are present.\n\n### References\n\nhttps://github.com/jaredallard/archives/security/advisories/GHSA-j95m-rcjp-q69h",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "go.rgst.io/stencil/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jaredallard/archives/security/advisories/GHSA-j95m-rcjp-q69h"
}, {
"type" : "WEB",
"url" : "https://github.com/rgst-io/stencil/security/advisories/GHSA-p799-q2pr-6mxj"
}, {
"type" : "WEB",
"url" : "https://github.com/rgst-io/stencil/pull/255"
}, {
"type" : "WEB",
"url" : "https://github.com/rgst-io/stencil/commit/5482fcada0c6f77d903d13129bd656b7df80ac3a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rgst-io/stencil"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-29T00:08:44Z",
"nvd_published_at" : null
}
}