CVE-2026-44973: Github.com/go git/go billy/v5 Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-qw64-3x98-g7q2
CVSS 8.1
CWE-22
Published
Advisory Summary

CVE-2026-44973 is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/go git/go billy/v5 libraries in the Go ecosystem. The issue involves go-billy has path traversal vulnerabilities. Remediation is available by upgrading affected packages to version 5.9.0, 6.0.0-alpha.1.

CVE-2026-44973 at a Glance

CVE Identifier CVE-2026-44973
GHSA Identifier GHSA-qw64-3x98-g7q2
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/go git/go billy/v5
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-44973

To remediate this vulnerability, upgrade all affected Github.com/go git/go billy/v5 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-git/go-billy/v5 fixed: 5.9.0
Upgrade github.com/go-git/go-billy/v5 to 5.9.0
github.com/go-git/go-billy/v6 fixed: 6.0.0-alpha.1
Upgrade github.com/go-git/go-billy/v6 to 6.0.0-alpha.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-git/go-billy/v5

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44973, inspect your project dependencies for Github.com/go git/go billy/v5:

inspect dependencies for github.com/go-git/go-billy/v5

Analyze the terminal output to locate any version of Github.com/go git/go billy/v5 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.9.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 Github.com/go git/go billy/v5, 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

### Impact Multiple path traversal issues exist across different components of `go-billy`. Insufficient path sanitization and boundary enforcement may allow crafted paths (e.g., using `..`) to escape intended base directories. While go-billy was not originally designed to provide a strong security boundary, some of these issues were inconsistent across some of the built-in implementations. This results in scenarios where applications relying on `go-billy` for some level of isolation may inadvertently expose access to unintended filesystem locations. The `osfs.ChrootOS` implementation is notably affected by this vulnerability and is now deprecated in `v5`, removed at `v6`. Users are recommended to move on to `osfs.BoundOS` instead: `osfs.New(path, WithBoundOS())`. Users requiring stronger security boundary enforcement are recommended to upgrade to `v6`, where the `osfs` implementation are backed by the [traversal-resistant](https://go.dev/blog/osroot) primitive [os.Root](https://pkg.go.dev/os#Root). ### Patches Users should upgrade to a patched version in order to mitigate this vulnerability. Versions prior to `v5` are likely to be affected, users are recommended to upgrade to a supported `go-billy` version. ### Credits Thanks to @faran66 and @vnykmshr for finding and separately reporting this issue privately to the go-git project. 🙇

CVE-2026-44973 Affected Github.com/go git/go billy/v5 Versions

2 component(s)
Fixed Versions:
5.9.06.0.0-alpha.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-git/go-billy/v5
Go
< 5.9.0
5.9.0
github.com/go-git/go-billy/v6
Go
< 6.0.0-alpha.1
6.0.0-alpha.1

References

Frequently Asked Questions

What is CVE-2026-44973?
CVE-2026-44973 is a security vulnerability in Github.com/go git/go billy/v5 involving go-billy has path traversal vulnerabilities under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/go git/go billy/v5 versions are affected?
Affected versions include releases prior to 5.9.0, 6.0.0-alpha.1 across affected packages: github.com/go-git/go-billy/v5, github.com/go-git/go-billy/v6.
What version fixes CVE-2026-44973?
Upgrading to 5.9.0, 6.0.0-alpha.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-git/go-billy/v5 affected?
Yes, github.com/go-git/go-billy/v5 is affected in releases prior to 5.9.0. Upgrade your dependency to 5.9.0 or later.
Is github.com/go-git/go-billy/v6 affected?
Yes, github.com/go-git/go-billy/v6 is affected in releases prior to 6.0.0-alpha.1. Upgrade your dependency to 6.0.0-alpha.1 or later.
What is the CVSS score of CVE-2026-44973?
CVE-2026-44973 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-44973?
CVE-2026-44973 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check Go dependencies for CVE-2026-44973?
Run the dependency tree command: 'inspect dependencies for github.com/go-git/go-billy/v5'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qw64-3x98-g7q2",
  "modified" : "2026-06-09T10:26:27Z",
  "published" : "2026-05-14T18:25:38Z",
  "aliases" : [ "CVE-2026-44973" ],
  "summary" : "go-billy has path traversal vulnerabilities",
  "details" : "### Impact\nMultiple path traversal issues exist across different components of `go-billy`. Insufficient path sanitization and boundary enforcement may allow crafted paths (e.g., using `..`) to escape intended base directories.\n\nWhile go-billy was not originally designed to provide a strong security boundary, some of these issues were inconsistent across some of the built-in implementations. This results in scenarios where applications relying on `go-billy` for some level of isolation may inadvertently expose access to unintended filesystem locations.\n\nThe `osfs.ChrootOS` implementation is notably affected by this vulnerability and is now deprecated in `v5`, removed at `v6`. Users are recommended to move on to `osfs.BoundOS` instead: `osfs.New(path, WithBoundOS())`.\n\nUsers requiring stronger security boundary enforcement are recommended to upgrade to `v6`, where the `osfs` implementation are backed by the [traversal-resistant](https://go.dev/blog/osroot) primitive [os.Root](https://pkg.go.dev/os#Root).\n\n### Patches\nUsers should upgrade to a patched version in order to mitigate this vulnerability. Versions prior to `v5` are likely to be affected, users are recommended to upgrade to a supported `go-billy` version.\n\n### Credits\nThanks to @faran66 and @vnykmshr for finding and separately reporting this issue privately to the go-git project. 🙇",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-git/go-billy/v5"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.9.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-git/go-billy/v6"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.0.0-alpha.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-git/go-billy/security/advisories/GHSA-qw64-3x98-g7q2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44973"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-git/go-billy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-git/go-billy/releases/tag/v5.9.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-git/go-billy/releases/tag/v6.0.0-alpha.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T18:25:38Z",
    "nvd_published_at" : "2026-05-28T22:16:59Z"
  }
}