You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] [Windows sandbox] schannel TLS fails with SEC_E_NO_CREDENTIALS under workspace-write/read-only (restricted token)
#3207
In confined modes, any schannel-based HTTPS request from inside the sandbox
fails with SEC_E_NO_CREDENTIALS (0x8009030e). The README states "reads,
network, and process visibility are not [restricted]" — but schannel credential
acquisition actually breaks under the restricted token. OpenSSL-based tools
(Node/Python) are unaffected.
Invoke-WebRequest -Uri https://www.baidu.com -UseBasicParsing
→ "The underlying connection was closed"
Control (works): node -e "fetch('https://www.baidu.com').then(r=>console.log(r.status))"
→ 200
Root cause analysis (evidence chain)
The sandbox spawns children under a CreateRestrictedToken with flags DISABLE_MAX_PRIVILEGE | SANDBOX_INERT | WRITE_RESTRICTED (0x0D).
whoami /all under the restricted token: only SeChangeNotifyPrivilege
remains; BUILTIN\Administrators is deny-only; Medium integrity level.
Certificate stores are NOT the problem — .NET X509Store("My","CurrentUser")
opens (1 cert) and X509Store("Root","LocalMachine") opens (54 certs).
The failure is precisely at credential acquisition: SslStream.AuthenticateAsClient throws "No credentials are available in the security package".
Control experiment: the SAME Invoke-WebRequest https://www.baidu.com
succeeds (HTTP 200) under danger-full-access (unconfined token).
→ the restricted token is the necessary & sufficient cause.
Node/OpenSSL is immune because it bundles its own Mozilla CA store (120 roots)
and never calls schannel.
Expected vs actual
README "Verified boundaries": network should not be restricted; a confined
child can "open sockets".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
结论(中文)
Windows 沙箱在 workspace-write / read-only 模式下用受限令牌
(CreateRestrictedToken,DISABLE_MAX_PRIVILEGE | SANDBOX_INERT | WRITE_RESTRICTED)
启动子进程,导致 schannel 系工具(curl / PowerShell / .NET)的 HTTPS 全部报
SEC_E_NO_CREDENTIALS;OpenSSL 系(Node / Python)不受影响。
已用 danger-full-access 对照实验证明受限令牌是根因。
README 称"网络不受限"与此矛盾,建议文档化或修复。
Environment
Summary
In confined modes, any schannel-based HTTPS request from inside the sandbox
fails with SEC_E_NO_CREDENTIALS (0x8009030e). The README states "reads,
network, and process visibility are not [restricted]" — but schannel credential
acquisition actually breaks under the restricted token. OpenSSL-based tools
(Node/Python) are unaffected.
Steps to reproduce
In a workspace-write session:
curl.exe -s -m 10 https://www.baidu.com→ exit 35; verbose shows
AcquireCredentialsHandle failed: SEC_E_NO_CREDENTIALSInvoke-WebRequest -Uri https://www.baidu.com -UseBasicParsing→ "The underlying connection was closed"
node -e "fetch('https://www.baidu.com').then(r=>console.log(r.status))"→ 200
Root cause analysis (evidence chain)
CreateRestrictedTokenwith flagsDISABLE_MAX_PRIVILEGE | SANDBOX_INERT | WRITE_RESTRICTED(0x0D).whoami /allunder the restricted token: onlySeChangeNotifyPrivilegeremains;
BUILTIN\Administratorsis deny-only; Medium integrity level.X509Store("My","CurrentUser")opens (1 cert) and
X509Store("Root","LocalMachine")opens (54 certs).SslStream.AuthenticateAsClientthrows "No credentials are available in the security package".Invoke-WebRequest https://www.baidu.comsucceeds (HTTP 200) under
danger-full-access(unconfined token).→ the restricted token is the necessary & sufficient cause.
and never calls schannel.
Expected vs actual
child can "open sockets".
Impact
danger-full-accessmode.All reactions