The title's crash dumps carry the PC's whole environment block, credentials included #702

Open
opened 2026-11-26 04:29:56 +00:00 by github-bot · 1 comment
Owner

@⁠derekhearst on GitHub · 2026-11-24 03:51 UTC · original

On main 91f9a5e, before I ran with XCL_NETWORK=0 (see #305 for why that alone isn't enough), the title's Breakpad reporter uploaded a 29 MB minidump to submit.backtrace.io (HTTP 200). I scanned my local copy of that dump: it contains the process's full environment block, 56 variables. That includes the Windows user and computer name, user-profile paths, PATH, and four credentials I had set as user environment variables (an API key, a cloud connection string and two passwords). I'm rotating them.

The title runs in xcl.exe's process, so it inherits the PC's environment. A console title never sees one. Proposal: before the title's entry point, XCL replaces the process environment with a minimal one, keeping only what the runtime and Windows need (SystemRoot, windir, TEMP/TMP, XCL_* and the like), with an opt-out switch. Any dump that escapes then carries nothing personal, and the title sees something closer to a console.

Until then, users can avoid the leak by keeping credentials out of user environment variables and running with XCL_NETWORK=0 plus a firewall block on xcl.exe.

Tested: a scan of my own dump, counting variable names only; no values or game data shared. Windows 11, RTX 4070 Ti. AI use: Claude Code (Claude Opus 5.5) found the upload in the log, scanned the dump and drafted this issue.

**@⁠derekhearst** on GitHub · 2026-11-24 03:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/702) On `main` `91f9a5e`, before I ran with `XCL_NETWORK=0` (see #305 for why that alone isn't enough), the title's Breakpad reporter uploaded a 29 MB minidump to `submit.backtrace.io` (HTTP 200). I scanned my local copy of that dump: it contains the process's full environment block, 56 variables. That includes the Windows user and computer name, user-profile paths, PATH, and four credentials I had set as user environment variables (an API key, a cloud connection string and two passwords). I'm rotating them. The title runs in `xcl.exe`'s process, so it inherits the PC's environment. A console title never sees one. Proposal: before the title's entry point, XCL replaces the process environment with a minimal one, keeping only what the runtime and Windows need (`SystemRoot`, `windir`, `TEMP`/`TMP`, `XCL_*` and the like), with an opt-out switch. Any dump that escapes then carries nothing personal, and the title sees something closer to a console. Until then, users can avoid the leak by keeping credentials out of user environment variables and running with `XCL_NETWORK=0` plus a firewall block on `xcl.exe`. Tested: a scan of my own dump, counting variable names only; no values or game data shared. Windows 11, RTX 4070 Ti. AI use: Claude Code (Claude Opus 5.5) found the upload in the log, scanned the dump and drafted this issue.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:29:56 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 04:42 UTC · original

Two open PRs fix this: #730 (e494814) and #740 (5579aac). They take different routes. A comparison from reading both against main f4ce27c (not run):

#730 #740
Where the launcher builds a filtered block for CreateProcessW (launcher.rs spawn_host) the host deletes variables with remove_var just before the title's entry point (host.rs)
Secrets ever in the game process no yes, until the title starts. XCL's own threads (xcl-activity, xcl-thread-dump) and any DLL loaded before then see them, and a copy made earlier (e.g. the CRT's environ, if something called getenv) isn't cleared by remove_var, so a dump with heap memory can still carry it
User and computer name, profile paths (also named in this issue) dropped (only LOCALAPPDATA kept) kept: USERNAME, COMPUTERNAME, USERDOMAIN, USERPROFILE, APPDATA, HOMEPATH
PATH replaced with %SystemRoot%\System32 kept
Opt-out XCL_KEEP_ENV=1 XCL_KEEP_ENV=1

Does #730's narrower block break anything? Not that I found. Outside XCL_*, the runtime only reads LOCALAPPDATA (agility.rs:226, dxc.rs:559, launcher.rs:14) and SystemRoot (pe.rs:630, preflight.rs:152), and both are kept. DXC is found through XCL_DXC_DIR, the exe's folder or the Windows SDK folders, not PATH (dxc.rs candidates), and the Agility loader uses LOAD_LIBRARY_SEARCH_SYSTEM32. spawn_host is the only way into the host process (main.rs:48 is entered through XCL_HOST), so #730 covers every launch.

So #730 covers what this issue asks for, by construction; #740 covers credentials but leaves the user and profile names. Either way, one of the two can close.

AI-assisted (Claude Code), read-only review.

**@⁠upipibi** on GitHub · 2026-11-24 04:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/702#issuecomment-7122268559) Two open PRs fix this: #730 (`e494814`) and #740 (`5579aac`). They take different routes. A comparison from reading both against `main` `f4ce27c` (not run): | | #730 | #740 | |---|---|---| | Where | the launcher builds a filtered block for `CreateProcessW` (`launcher.rs` `spawn_host`) | the host deletes variables with `remove_var` just before the title's entry point (`host.rs`) | | Secrets ever in the game process | no | yes, until the title starts. XCL's own threads (`xcl-activity`, `xcl-thread-dump`) and any DLL loaded before then see them, and a copy made earlier (e.g. the CRT's `environ`, if something called `getenv`) isn't cleared by `remove_var`, so a dump with heap memory can still carry it | | User and computer name, profile paths (also named in this issue) | dropped (only `LOCALAPPDATA` kept) | kept: `USERNAME`, `COMPUTERNAME`, `USERDOMAIN`, `USERPROFILE`, `APPDATA`, `HOMEPATH` | | `PATH` | replaced with `%SystemRoot%\System32` | kept | | Opt-out | `XCL_KEEP_ENV=1` | `XCL_KEEP_ENV=1` | Does #730's narrower block break anything? Not that I found. Outside `XCL_*`, the runtime only reads `LOCALAPPDATA` (`agility.rs:226`, `dxc.rs:559`, `launcher.rs:14`) and `SystemRoot` (`pe.rs:630`, `preflight.rs:152`), and both are kept. DXC is found through `XCL_DXC_DIR`, the exe's folder or the Windows SDK folders, not `PATH` (`dxc.rs` `candidates`), and the Agility loader uses `LOAD_LIBRARY_SEARCH_SYSTEM32`. `spawn_host` is the only way into the host process (`main.rs:48` is entered through `XCL_HOST`), so #730 covers every launch. So #730 covers what this issue asks for, by construction; #740 covers credentials but leaves the user and profile names. Either way, one of the two can close. AI-assisted (Claude Code), read-only review.
This discussion has been locked. Commenting is limited to contributors.
No description provided.