CVE-2025-3509

Pre-Receive Hook Remote Code Execution vulnerability was identified in GitHub Enterprise Server that allowing Privilege Escalation

State
Published
Severity
7.1 High
Published
Apr 17, 2025
Updated
Jun 18, 2025
Reserved
Apr 10, 2025

Read the record on cve.org

Description

A Remote Code Execution (RCE) vulnerability was identified in GitHub Enterprise Server that allowed attackers to execute arbitrary code by exploiting the pre-receive hook functionality, potentially leading to privilege escalation and system compromise. The vulnerability involves using dynamically allocated ports that become temporarily available, such as during a hot patch upgrade. This means the vulnerability is only exploitable during specific operational conditions, which limits the attack window. Exploitation required either site administrator permissions to enable and configure pre-receive hooks or a user with permissions to modify repositories containing pre-receive hooks where this functionality was already enabled. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.18 and was fixed in versions 3.17.1, 3.16.4, 3.15.8, 3.14.13, 3.13.16. This vulnerability was reported via the GitHub Bug Bounty program.

Scores

CVSSScoreVectorSource
4.07.1 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:L/SC:L/SI:H/SA:L/AU:N/R:U/V:C/RE:M/U:AmberGitHub_P

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
Enterprise ServerGitHub
  • 3.13.0 through 3.13.15Affectedfrom 3.13.16Not affected
  • 3.14.0 through 3.14.12Affectedfrom 3.14.13Not affected
  • 3.15.0 through 3.15.7Affectedfrom 3.15.8Not affected
  • 3.16.0 through 3.16.3Affectedfrom 3.16.4Not affected
  • 13.17.0 to before 13.17.1Affectedfrom 3.17.1Not affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.