Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. go.rgst.io/stencil/v2
  4. ›
  5. GHSA-p799-q2pr-6mxj

GHSA-p799-q2pr-6mxj: go.rgst.io/stencil/v2 vulnerable to Path Traversal

March 29, 2025

The 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.

The 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”.

References

  • github.com/advisories/GHSA-p799-q2pr-6mxj
  • github.com/jaredallard/archives/security/advisories/GHSA-j95m-rcjp-q69h
  • github.com/rgst-io/stencil
  • github.com/rgst-io/stencil/commit/5482fcada0c6f77d903d13129bd656b7df80ac3a
  • github.com/rgst-io/stencil/pull/255
  • github.com/rgst-io/stencil/security/advisories/GHSA-p799-q2pr-6mxj

Code Behaviors & Features

Detect and mitigate GHSA-p799-q2pr-6mxj with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.3.0

Fixed versions

  • 2.3.0

Solution

Upgrade to version 2.3.0 or above.

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/go.rgst.io/stencil/v2/GHSA-p799-q2pr-6mxj.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 00:14:27 +0000.