Microsandbox hostname allowlist bypass via mismatched HTTP Host/:authority
Description
Microsandbox hostname-based egress allow rules could be bypassed when the hostname used to authorize a connection did not match the later HTTP request authority.
For plaintext HTTP, a sandbox could connect through an allowed hostname and send a different Host header. For HTTPS with TLS interception disabled or bypassed, Microsandbox could observe DNS/SNI and destination IP state, but could not inspect the encrypted Host / :authority value used by the upstream service after TLS was established.
This affects sandboxes that rely on hostname allowlists as an egress security boundary, especially deny-by-default configurations running untrusted code.
Impact
An attacker who can execute code inside a sandbox may be able to reach an unlisted destination through compatible shared infrastructure, such as a CDN, reverse proxy, or multi-tenant service edge that routes requests by HTTP Host or HTTP/2 :authority.
This can allow exfiltration of secrets, source code, user/model data, or other data available to the sandboxed process. It can also allow payload download or command-and-control traffic despite a hostname allowlist.
This is not a host escape and does not by itself grant code execution outside the sandbox.
Affected configurations
The issue affects versions before 0.6.18 when all of the following are true:
- the sandbox uses hostname-based egress allow rules, usually with default-deny egress;
- untrusted or attacker-controlled code can run inside the sandbox;
- the attacker can use compatible shared infrastructure where the connection hostname and request authority can differ.
Plaintext HTTP was affected before 0.6.18. HTTPS was affected when TLS interception was disabled or bypassed, because the encrypted request authority was not inspectable by Microsandbox.
Versions 0.6.18 through 0.7.2 include the HTTP fix and strict hostname policy support, but users who rely on HTTPS hostname allowlists without TLS interception should enable strict mode. Version 0.7.3 enables strict hostname policy mode by default.
HTTPS authority validation when TLS interception is enabled was previously addressed in github.com/
Patches
Upgrade to 0.6.18 or later.
- 0.6.18 fixed plaintext HTTP
Hostalignment and added strict hostname policy mode. - 0.7.3 enables strict hostname policy mode by default, so hostname-only allows fail closed when Microsandbox cannot inspect request authority.
Workarounds
For 0.6.18 through 0.7.2, enable strict hostname policy mode for sandboxes that rely on HTTPS hostname allowlists without TLS interception:
- CLI:
--net-strict - Config/SDKs:
network.strict = true
Alternatively, enable TLS interception for HTTPS hostname allowlists where request authority must be verified.
If a sandbox already allows broad outbound internet access, the practical impact of this issue is reduced because hostname allowlists are not being used as the primary egress boundary.
References
- Plaintext HTTP fix and strict hostname policy support in 0.6.18: github.com/
superradcompany/ microsandbox/ releases/ tag/ v0.6.18 - Strict mode enabled by default in 0.7.3: github.com/
superradcompany/ microsandbox/ pull/ 1643 - v0.7.3 release: github.com/
superradcompany/ microsandbox/ releases/ tag/ v0.7.3 - TLS-intercepted HTTPS authority alignment: github.com/
superradcompany/ microsandbox/ pull/ 709
Remediation
Upgrade the affected packages to 0.6.18 or later.