# GHSA-XGG5-HJWQ-2GW8: Microsandbox domain deny rule bypass via direct-IP TLS connection

- Database: GitHub
- Severity: CVSS 5.4 (Medium)
- Published: 2026-10-09
- Modified: 2026-11-14

## Affected versions

- microsandbox (crates.io): fixed in 0.5.0
- microsandbox (npm): fixed in 0.5.0
- microsandbox (PyPI): fixed in 0.5.0
- microsandbox-cli (crates.io): fixed in 0.5.0

## Description

### Summary
Microsandbox domain and suffix deny rules could be bypassed for TLS traffic when default egress was set to allow. A process in the sandbox could connect directly to an IP address and send a TLS SNI matching the denied hostname, without first resolving it through the sandbox DNS path, and the connection was allowed.

Allow and deny rules shared one domain matching helper. For SNI-based `Destination::Domain` and `Destination::DomainSuffix` checks, it required both a hostname match and a prior DNS-cache binding between the destination IP and that hostname. That binding is correct for allow rules, since it stops a guest from spoofing SNI for an unrelated IP. For deny rules it meant a missing binding made the rule a non-match, so evaluation fell through to `default_egress: Allow`.

### Impact
An attacker who can execute code inside a sandbox could open TLS connections to a domain the operator explicitly denied. This weakens domain blocklists used to block exfiltration destinations, internal services reachable by IP, or policy-controlled SaaS endpoints.

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.5.0 when all of the following are true:

- the sandbox uses permissive default egress (`--net-default allow`);
- the policy relies on a domain or suffix deny rule, such as `deny@evil.com` or `deny@*.evil.com`;
- untrusted or attacker-controlled code can run inside the sandbox and connect directly to an IP address that serves the denied hostname over TLS.

Sandboxes using default-deny egress with hostname allow rules are not affected by this issue, because allow rules already required the DNS-cache binding.

### Patches
Upgrade to 0.5.1 or later (0.5.0 where available).

- 0.5.0 makes SNI domain matching action-aware: deny rules match on the SNI alone, while allow rules still require the DNS-cache binding.
- 0.5.0 was not published to npm and was yanked from crates.io, so npm and Rust users should use 0.5.1.

### Workarounds
If you cannot upgrade, use default-deny egress with explicit allow rules instead of relying on domain deny rules.

### References
- Fix: #782
- v0.5.0 release: https://github.com/superradcompany/microsandbox/releases/tag/v0.5.0


## Remediation

Upgrade each package to the patched version listed in the package metadata above.

## References

- https://github.com/superradcompany/microsandbox/security/advisories/GHSA-xgg5-hjwq-2gw8

Page: https://cve.now/GHSA-XGG5-HJWQ-2GW8

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
