CVE-2026-44740: go-billy Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-m3xc-h892-ggx6
CVSS 6.5
CWE-835 CWE-674
Published
Advisory Summary

CVE-2026-44740 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting go-billy libraries in the Go ecosystem. The issue involves lack of depth and cycle detection in symlink resolution may lead to infinite loops and resource exhaustion. Remediation is available by upgrading affected packages to version 5.9.0, 6.0.0-alpha.1.

CVE-2026-44740 at a Glance

CVE Identifier CVE-2026-44740
GHSA Identifier GHSA-m3xc-h892-ggx6
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product go-billy
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-44740

To remediate this vulnerability, upgrade all affected go-billy 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-44740, inspect your project dependencies for go-billy:

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

Analyze the terminal output to locate any version of go-billy 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In go-billy, 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 components may improperly handle crafted or malformed input, resulting in panics, infinite loops, uncontrolled recursion, or excessive resource consumption. These issues arise from insufficient validation and missing safety mechanisms such as cycle detection, recursion limits, or defensive handling of unexpected states when processing untrusted repository data and filesystem structures. ### 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 for finding and reporting this issue privately to the go-git project. 🙇

CVE-2026-44740 Affected go-billy 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-44740?
CVE-2026-44740 is a security vulnerability in go-billy involving Lack of depth and cycle detection in symlink resolution may lead to infinite loops and resource exhaustion under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which go-billy 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-44740?
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-44740?
CVE-2026-44740 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-44740?
CVE-2026-44740 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Go dependencies for CVE-2026-44740?
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-m3xc-h892-ggx6",
  "modified" : "2026-06-09T10:50:07Z",
  "published" : "2026-05-13T15:29:47Z",
  "aliases" : [ "CVE-2026-44740" ],
  "summary" : "go-billy: Lack of depth and cycle detection in symlink resolution may lead to infinite loops and resource exhaustion",
  "details" : "### Impact\nMultiple components may improperly handle crafted or malformed input, resulting in panics, infinite loops, uncontrolled recursion, or excessive resource consumption.\n\nThese issues arise from insufficient validation and missing safety mechanisms such as cycle detection, recursion limits, or defensive handling of unexpected states when processing untrusted repository data and filesystem structures.\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 for finding and 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:N/I:N/A:H"
  } ],
  "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-m3xc-h892-ggx6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44740"
  }, {
    "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-674", "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-13T15:29:47Z",
    "nvd_published_at" : "2026-06-01T17:17:08Z"
  }
}