# CVE-2025-3509: Pre-Receive Hook Remote Code Execution vulnerability was identified in GitHub Enterprise Server that allowing Privilege Escalation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v4.0, CNA) `CVSS: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:Amber`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: High; User interaction: None; Confidentiality impact: Low; Integrity impact: High; Availability impact: Low; Confidentiality impact on other systems: Low; Integrity impact on other systems: High; Availability impact on other systems: Low; AU: N; R: U; V: C; RE: M; U: Amber
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.81% (percentile 79, 2026-11-26)
- **CWE:** CWE-94
- **Published:** 2025-04-17T22:50:18.437Z
- **Modified:** 2026-06-17T09:20:04.700Z

## Who should check

- Anyone running GitHub Enterprise Server \>= 3.13.0, \<= 3.13.15; \>= 3.14.0, \<= 3.14.12; \>= 3.15.0, \<= 3.15.7; \>= 3.16.0, \<= 3.16.3; \>= 13.17.0, \< 13.17.1

## 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.

## Affected and fixed versions

- GitHub Enterprise Server: \>= 3.13.0, \<= 3.13.15; \>= 3.14.0, \<= 3.14.12; \>= 3.15.0, \<= 3.15.7; \>= 3.16.0, \<= 3.16.3; \>= 13.17.0, \< 13.17.1 (cvelist)

## Mitigation

- Upgrade Enterprise Server to 13.17.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-3509. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-3509.md
Affected: GitHub Enterprise Server >= 3.13.0, <= 3.13.15; >= 3.14.0, <= 3.14.12; >= 3.15.0, <= 3.15.7; >= 3.16.0, <= 3.16.3; >= 13.17.0, < 13.17.1
Fixed in: GitHub Enterprise Server 13.17.1

Steps:
1. Search this machine and project for GitHub Enterprise Server: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-3509 being exploited?

There is no confirmed exploitation: CVE-2025-3509 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.81% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-3509?

High: CVSS 7.1 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2025-3509?

GitHub Enterprise Server \>= 3.13.0, \<= 3.13.15; \>= 3.14.0, \<= 3.14.12; \>= 3.15.0, \<= 3.15.7; \>= 3.16.0, \<= 3.16.3; \>= 13.17.0, \< 13.17.1.

### Is there a fix for CVE-2025-3509?

Yes. Fixed in GitHub Enterprise Server 13.17.1. Upgrade Enterprise Server to 13.17.1 or later.

### How do I check if I'm affected by CVE-2025-3509?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://docs.github.com/en/enterprise-server@3.13/admin/release-notes#3.13.16>
- other: <https://docs.github.com/en/enterprise-server@3.14/admin/release-notes#3.14.13>
- other: <https://docs.github.com/en/enterprise-server@3.15/admin/release-notes#3.15.8>
- other: <https://docs.github.com/en/enterprise-server@3.16/admin/release-notes#3.16.4>
- other: <https://docs.github.com/en/enterprise-server@3.17/admin/release-notes#3.17.1>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-3509>

HTML: <https://flawdb.com/CVE-2025-3509> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-3509>
