# Malformed NAV file leads to buffer overflow and code execution in Left4Dead2.exe

Malformed NAV navigation-mesh file overflows a buffer in Left4Dead2.exe, letting an attacker control EIP and achieve remote code execution via a malicious server or Workshop map.

- Payout: $10,000
- Severity: critical
- Program: Valve
- Found by: hunterstanton
- Disclosed: 2020-03-25
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/542180
- Library page: https://bugbountylibrary.com/r/h1%3A542180
- Tags: area:os domain:desktop impact:integrity impact:rce kind:bounty platform:hackerone sev:critical tech:windows technique:reverse-engineering vuln:memory-corruption vuln:rce

**Target:** Left4Dead2.exe NAV file parser (Source engine navigation mesh)
**Root cause:** NAV file parsing routines lack bounds checking on attacker-controlled data, allowing a buffer overflow that overwrites the saved return address/EIP.
**Steps:**
1. Place crafted `c1m1_hotel.nav` in `<steamapps>/Left 4 Dead 2/left4dead2/maps/`
2. Launch Left4Dead 2 and attach a debugger
3. Run `map c1m1_hotel` in the developer console
4. Observe EIP becomes `0x41414102`, confirming overflow and EIP control
**How found:** Researcher examined the NAV parsing routines (navigation mesh used by AI) and identified missing bounds checks, then crafted a malformed NAV to confirm EIP control under a debugger.
**Exploitation:** Attacker crafts a malformed NAV file; because binkw32.dll ships without ASLR, no infoleak is needed and a ROP chain can be built to run arbitrary code. Delivered either by a fake dedicated server pushing the file to connecting clients or by a Workshop campaign map containing the malformed NAV.
**Escalation:** Chains file delivery (server file transfer or Workshop distribution) with the memory corruption to turn a local parse bug into remote code execution on victims.
**Insight:** Game asset parsers (NAV/BSP/etc.) are high-value attack surface; check whether shipped modules like binkw32.dll lack ASLR, which removes the infoleak barrier and makes a parse overflow directly weaponizable via ROP.

