# CVE-2025-3509: pre-receive hook RCE via port reuse

incident, `incident:cve-2025-3509`. Page: https://ghtier.com/incidents/cve-2025-3509

During windows such as a hot patch upgrade, a pre-receive hook on GitHub Enterprise Server could take over a dynamically allocated port that briefly became free and run code on the appliance, for a site admin or anyone who could edit a repository with hooks.

**Used:** [Escalate from a GHES role to root](https://ghtier.com/attack-paths/technique-admin-to-root.md) (Tier 0)

**Sources:**
- [GHSA-g3x6-r9w9-mcxx: CVE-2025-3509, pre-receive hook RCE](https://github.com/advisories/GHSA-g3x6-r9w9-mcxx)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
