/

CVE-2026-17556

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in GitHub Enterprise Server

CVE-2026-17556

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File and Directory Deletion

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in GitHub Enterprise Server allowed unauthenticated network attackers to influence a filesystem path used by deferred cleanup processing. Successful exploitation could recursively delete arbitrary files and directories, including storage containing Git LFS objects, release assets, attachments, and avatars.

A path traversal vulnerability in GitHub Enterprise Server allowed unauthenticated network attackers to influence a filesystem path used by deferred cleanup processing. Successful exploitation could recursively delete arbitrary files and directories, including storage containing Git LFS objects, release assets, attachments, and avatars.

Affected context

The vulnerability occurs in the GitHub Enterprise Server upload-buffer and deferred-cleanup workflow when the X-GitHub-Request-Id request header is incorporated into a filesystem path without sufficient sanitization. Deployments reachable by an attacker may be exposed because exploitation does not depend on private mode being disabled or on the attacker having an authenticated account.

The vulnerability occurs in the GitHub Enterprise Server upload-buffer and deferred-cleanup workflow when the X-GitHub-Request-Id request header is incorporated into a filesystem path without sufficient sanitization. Deployments reachable by an attacker may be exposed because exploitation does not depend on private mode being disabled or on the attacker having an authenticated account.

Exploit preconditions

  • Attack surface: Network-accessible GitHub Enterprise Server request handling
  • Required access: Network reachability; authentication is not required
  • Trigger point: Upload-buffer path construction followed by deferred recursive cleanup
  • Why exploitation is possible: A request-controlled header is used as a filesystem path segment without adequate traversal protection, allowing cleanup to target an unintended location
  • Attack surface: Network-accessible GitHub Enterprise Server request handling
  • Required access: Network reachability; authentication is not required
  • Trigger point: Upload-buffer path construction followed by deferred recursive cleanup
  • Why exploitation is possible: A request-controlled header is used as a filesystem path segment without adequate traversal protection, allowing cleanup to target an unintended location

Why this happens

The underlying bug is improper neutralization of a user-controlled path component before filesystem use. A request header was treated as a trusted directory-name segment, allowing traversal semantics to escape the intended upload-buffer directory and influence a recursive deletion operation. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying bug is improper neutralization of a user-controlled path component before filesystem use. A request header was treated as a trusted directory-name segment, allowing traversal semantics to escape the intended upload-buffer directory and influence a recursive deletion operation. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Arbitrary files and directories may be deleted
  • Git LFS objects, release assets, attachments, and avatars could be lost
  • Repository-related services may become unavailable or degraded
  • Data integrity and operational continuity could be affected
  • Recovery efforts may require restoration from protected backups
  • Arbitrary files and directories may be deleted
  • Git LFS objects, release assets, attachments, and avatars could be lost
  • Repository-related services may become unavailable or degraded
  • Data integrity and operational continuity could be affected
  • Recovery efforts may require restoration from protected backups

General mitigation guidance

Mitigation generally focuses on preventing request-controlled values from determining filesystem locations and limiting the consequences of cleanup operations.

Common defensive patterns include:

  • Resolve candidate paths against a fixed trusted base directory and verify that the result remains within that directory
  • Reject traversal sequences, absolute paths, symbolic-link escapes, and other ambiguous path forms
  • Use server-generated opaque identifiers rather than request headers as filesystem names
  • Apply strict allowlists and canonicalization before any filesystem operation
  • Restrict cleanup routines to dedicated, least-privileged storage areas
  • Add authorization and safety checks before recursive deletion
  • Use protected backups and recovery controls for persistent repository-associated data

Mitigation generally focuses on preventing request-controlled values from determining filesystem locations and limiting the consequences of cleanup operations.

Common defensive patterns include:

  • Resolve candidate paths against a fixed trusted base directory and verify that the result remains within that directory
  • Reject traversal sequences, absolute paths, symbolic-link escapes, and other ambiguous path forms
  • Use server-generated opaque identifiers rather than request headers as filesystem names
  • Apply strict allowlists and canonicalization before any filesystem operation
  • Restrict cleanup routines to dedicated, least-privileged storage areas
  • Add authorization and safety checks before recursive deletion
  • Use protected backups and recovery controls for persistent repository-associated data

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis rules for path construction using request headers, URL parameters, or other untrusted input
  • Code review checks for filesystem APIs receiving unsanitized external values
  • Tests covering canonicalization, traversal sequences, absolute paths, symbolic links, and cleanup boundaries
  • Runtime monitoring for unexpected recursive deletion activity or access outside designated storage roots
  • Policy enforcement requiring trusted path-joining utilities and constrained service accounts
  • Automated security review tools that flag untrusted input flowing into file and directory operations

Organizations commonly detect this class of issue through:

  • Static analysis rules for path construction using request headers, URL parameters, or other untrusted input
  • Code review checks for filesystem APIs receiving unsanitized external values
  • Tests covering canonicalization, traversal sequences, absolute paths, symbolic links, and cleanup boundaries
  • Runtime monitoring for unexpected recursive deletion activity or access outside designated storage roots
  • Policy enforcement requiring trusted path-joining utilities and constrained service accounts
  • Automated security review tools that flag untrusted input flowing into file and directory operations

Sources

SourceLink
docs.github.comdocs.github.com/en/enterprise-server@3.17/admin/release-notes#3.17.19
docs.github.comdocs.github.com/en/enterprise-server@3.18/admin/release-notes#3.18.13
docs.github.comdocs.github.com/en/enterprise-server@3.19/admin/release-notes#3.19.10
docs.github.comdocs.github.com/en/enterprise-server@3.20/admin/release-notes#3.20.6
docs.github.comdocs.github.com/en/enterprise-server@3.21/admin/release-notes#3.21.4

Frequently asked

questions

Yes. An attacker generally needs network reachability to the affected GitHub Enterprise Server instance, while authentication is not required.

The vulnerable request-processing path can be reached without an authenticated account. Private-mode configuration does not by itself eliminate the exposure.

Ensure that externally influenced values cannot escape a dedicated filesystem root, and use trusted server-generated identifiers for temporary and cleanup paths.

Combine canonical path validation, strict input allowlists, bounded cleanup routines, least-privilege filesystem permissions, targeted security testing, and monitoring for anomalous deletion activity.

Yes. An attacker generally needs network reachability to the affected GitHub Enterprise Server instance, while authentication is not required.

The vulnerable request-processing path can be reached without an authenticated account. Private-mode configuration does not by itself eliminate the exposure.

Ensure that externally influenced values cannot escape a dedicated filesystem root, and use trusted server-generated identifiers for temporary and cleanup paths.

Combine canonical path validation, strict input allowlists, bounded cleanup routines, least-privilege filesystem permissions, targeted security testing, and monitoring for anomalous deletion activity.

Find out what's already
exploitable in your codebase.