Valve's critically acclaimed 2011 puzzle platformer Portal 2 is the latest game from the company to have its source code leaked online.

The full source code appears to have originated from a Portal research Discord server by a user who already had access to it. However, online chatter suggests that the code had been circulating privately for years by this point. It has since spread to file-sharing sites and GitHub.

It's Valve's second notable leak in recent months. In August, the tech giant suffered a data breach that exposed more than 12 terabytes of internal data, including a decade's worth of Steam files. Regarding Portal, the leak allowed modders to replicate the mythically canceled F-Stop, a prequel to Portal.

Samsung Galaxy Tab A11+ 128GB Wi-Fi 11" Tablet (Gray) — $199.99 (List Price $299.99).

Ring 2K Battery Doorbell (2026 Release, Speckled Gray) — $99.99.

Blink Outdoor 4 1080p 3-Camera Kit With Sync Module Core + Doorbell — $65.99 (List Price $259.98).

Amazon Fire TV Stick 4K Plus Streaming Player With Remote (2025 Model) — $69.99.

Logitech G Pro X2 Superstrike Haptics Wireless Gaming Mouse (Black/White) — $159.99 (List Price $179.99).

Amazon Alexa Tablet 12 Pro 128GB Nanomatte Tablet (2026 Release, Graphite) — $399.99 (List Price $549.99).

Bambu Lab A1 Mini 3D Printer With LED Lamp Kit — $249.00.

Apple MacBook Air M5 Chip 512GB SSD 16GB RAM 13.6" Laptop (Silver) — $999.00 (List Price $1299.00).

Roborock Q10 S5+ Self-Emptying Robot Vacuum and Mop — $229.99 (List Price $549.99).

Meta Quest 3S 128GB With 3-Month Trial of Meta Horizon+ — $297.00 (List Price $349.99).

According to recent reports, the biggest discovery in the newly introduced leak is leftover code from Half-Life 2: Episode 3. That's the long-canceled final chapter of the Half-Life 2 saga, not to be confused with Half-Life 3. Episode 3 leftovers aren't new to Portal 2 — the game and its modding tools shipped with some, which gave fans a rough idea of the episode years before Valve's Half-Life 2 20th anniversary documentary and other recent leaks.

What's latest is the actual code Valve carried over from the canceled game. That doesn't mean there's enough there for something playable. As it's been confirmed many times, Valve abandoned development of Episode 3 sometime in 2008-2009. There's a small ray of hope for a Half-Life 3, but the closest you'll get to an Episode 3 is Valve's VR prequel, Half-Life: Alyx.

While some may assume Valve will shrug this one off given that Portal 2 is a 15-year-old game at this point, that GitHub link probably won't last for long. Mashable has reached out to Valve for comment but has not received a response at the time of publication.

Topics Cybersecurity Video Games.

Chance Townsend is the General Assignments Editor at Mashable, covering tech, video games, dating apps, digital culture, and whatever else comes his way. He has a Master's in Journalism from the University of North Texas and is a proud orange cat father. His writing has also appeared in PC Mag and Mother Jones.

Industry observers note that in his free time, he cooks, loves to sleep, and greatly enjoys Detroit sports. If you have any tips or want to talk shop about the Lions, you can reach out to him on Bluesky @offbrandchance.bsky.social, by email at [email protected], or on Signal at 224-417-6628.

→ Read original article