CVE-2025-3509
Published: 17 April 2025
Summary
CVE-2025-3509 is a high-severity Code Injection (CWE-94) vulnerability in Github Enterprise Server. Its CVSS base score is 7.1 (High).
Operationally, ranked in the top 15.5% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
Deeper analysis
A Remote Code Execution vulnerability tracked as CVE-2025-3509 affects GitHub Enterprise Server and stems from improper handling of pre-receive hook functionality when dynamically allocated ports become temporarily available, such as during hot-patch upgrades. The flaw, classified under CWE-94, impacts all versions prior to 3.18 and permits arbitrary code execution under narrow operational conditions that restrict the attack surface.
Exploitation requires either site-administrator privileges to enable and configure pre-receive hooks or repository-modification rights on instances where the feature is already active. Successful attacks can lead to privilege escalation and full system compromise, although the requirement for specific timing and elevated permissions limits broad applicability.
The official GitHub release notes for versions 3.17.1, 3.16.4, 3.15.8, 3.14.13, and 3.13.16 document the fixes and confirm that the issue was identified through the GitHub Bug Bounty program. Administrators are advised to upgrade to one of the patched releases to eliminate the exposure.
EPSS scores have remained low and stable, with a current value of 0.0213 and a peak of only 0.0226, indicating no material increase in observed exploitation interest after disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-11796
Vulnerability details
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…
more
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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Makes persistent code injection into loaded programs impossible when the executable image itself resides on hardware-protected read-only media.
Dynamically generated code can be produced and executed inside the isolated chamber, preventing host compromise from code-injection payloads.
Validates inputs used in dynamic code generation to block injected directives.
Directly prevents execution of attacker-supplied code written into data memory regions.