BoxLite is a sandbox runtime for untrusted code. Its README positions the product at AI agents that need to install packages, write files, and execute arbitrary programs, with the project's stated guarantee that "nothing escapes to your host." Before version 0.9.0, the read_only field on the runtime's VolumeSpec had exactly one runtime effect: it decided whether the log line for a mounted share printed ro or rw. The flag was read once, formatted into a string, and dropped. The hypervisor mounted every share read-write. The guest, running code the project documents as untrusted, was handed all 41 Linux capabilities, including CAP_SYS_ADMIN, and asked politely to honor the read-only mount option itself. mount -o remount,rw /data/readonly worked. CVE-2026-46695, CVSS 10.0, GHSA-g6ww-w5j2-r7x3, patched on 29 April 2026.
CVE-2026-46695: BoxLite's read_only Flag Decided Whether the Log Said 'ro'. Nothing Else.
vendor
patterns
cve
proof of concept
The read_only field was used to format a log line
Pre-patch, the mount loop in src/boxlite/src/vmm/krun/engine.rs looked like this:
for share in config.fs_shares.shares() {
let path_str = share.host_path.to_str().ok_or_else(|| {
BoxliteError::Engine(format!("Invalid path: {}", share.host_path.display()))
})?;
tracing::info!(
" {} → {} ({})",
share.tag,
share.host_path.display(),
if share.read_only { "ro" } else { "rw" }
);
ctx.add_virtiofs(&share.tag, path_str)?;
}share.read_only is read once, inside the tracing::info! macro, to choose between the literal string "ro" and the literal string "rw". The next line calls ctx.add_virtiofs(&share.tag, path_str) with two arguments. The flag is not one of them.
The FFI binding add_virtiofs was calling has no third parameter to receive it. From src/deps/libkrun-sys/src/lib.rs:
pub fn krun_add_virtiofs(
ctx_id: u32,
mount_tag: *const c_char,
host_path: *const c_char,
) -> i32;krun_add_virtiofs accepts the context, the tag, the host path. That is the full surface. There is no read-only argument because the libkrun v1.16.0 function does not have one. The hypervisor mounts the virtio-fs share as read-write at the device level for every caller, because the device-level mode is whatever default libkrun picked, not what the operator requested.
The read_only: bool on VolumeSpec had the type signature of a boolean enforcement and the runtime behavior of a log decoration.
The enforcement was a mount instruction sent to the untrusted code
Read-only on a virtio-fs share has two possible enforcement points. The hypervisor can expose the device read-only, in which case the guest kernel cannot write to it no matter what mount options it negotiates. Alternatively, the guest can mount the share with -o ro, in which case the guest kernel refuses writes through that mount point but the device underneath is still capable of receiving them.
The first is hardware-level enforcement. The second is the guest's kernel cooperating with the operator's intent.
BoxLite, before 0.9.0, did the second. The flag was logged on the host, then re-emitted as a guest-side mount instruction. The guest agent received the instruction. The guest agent is Zone 0 code, the project's own term for the untrusted environment the sandbox exists to contain. Asking the untrusted code to mount its own filesystem read-only is identical to asking it to be honest about what it does next.
The patch imports the libkrun v1.18.0 FFI function the old binding did not have:
pub fn krun_add_virtiofs3(
ctx_id: u32,
mount_tag: *const c_char,
host_path: *const c_char,
shm_size: u64,
read_only: bool,
) -> i32;krun_add_virtiofs3 has the parameter krun_add_virtiofs did not. The PR #454 diff that closes CVE-2026-46695 threads share.read_only through:
- ctx.add_virtiofs(&share.tag, path_str)?;
+ ctx.add_virtiofs(&share.tag, path_str, share.read_only)?;ctx.add_virtiofs itself gains the parameter and forwards it to the FFI. From the post-patch src/boxlite/src/vmm/krun/context.rs:
check_status("krun_add_virtiofs3", unsafe {
krun_add_virtiofs3(
self.ctx_id,
mount_tag_c.as_ptr(),
host_path_c.as_ptr(),
0,
read_only,
)
})This is enforcement on the host side of the hypervisor boundary. A guest with arbitrary kernel capabilities cannot remount a virtio-fs device read-write if the device is exposed read-only, because the writability is gated where the guest cannot see it. The fix is exactly the parameter the old code dropped.
The guest had all 41 capabilities. The comment above the function said it shouldn't.
A read-write virtio-fs share is not, by itself, the bug. A guest mounting that share -o ro and respecting the option could still produce the read-only contract. The bug is the combination: the device is read-write, the guest is untrusted, and the guest has every capability needed to undo the guest-side restriction.
Pre-patch, src/guest/src/container/capabilities.rs opened with this:
//! Linux capabilities
//!
//! Single source of truth for all 41 Linux capabilities.
//! Used by:
//! - OCI spec builder (process.capabilities)
//! - Tenant process spawning (exec capabilities)
use oci_spec::runtime::Capability;
use std::collections::HashSet;
/// Get all 41 Linux capabilities as a HashSet
///
/// This is the single source of truth for capabilities in the system.
/// Returns all capabilities for maximum compatibility.
///
/// # Security Note
/// This provides maximum compatibility but reduced security isolation.
/// For production, consider limiting to required capabilities only.
pub fn all_capabilities() -> HashSet<Capability> {
[
// File operations (CAP 0-4)
Capability::Chown,
Capability::DacOverride,
Capability::DacReadSearch,
Capability::Fowner,
Capability::Fsetid,
// ... 31 more entries ...
Capability::SysAdmin, // 21: various admin operations
// ...The function is named all_capabilities. The doc comment names what it does. Above the body, the developer wrote a section titled Security Note and said, in their own words, that this set "provides maximum compatibility but reduced security isolation" and that "for production, consider limiting to required capabilities only."
That note shipped to production on 9 December 2025, the repository's initial commit. It survived the workspace reorganization on 1 April 2026. It was still there when the XlabAI team at Tencent's Xuanwu Lab and the Atuin discovery engine landed the PoC. The function continued to return 41 capabilities including CAP_SYS_ADMIN for four months and twenty days, with the in-source instruction not to do that sitting three lines above the array literal.
This is the shape catalogued under Todo That Shipped: a comment names the security-relevant fix, and the code below ships without it. The recent Drupal exhibit (CVE-2026-9082) is the variant where the control was written and a later refactor removed it. BoxLite's variant is the one where the developer wrote the for production, consider limiting recommendation in their own words on the day the project went public, and shipped it for the entire life of the codebase up to the CVE.
CAP_SYS_ADMIN is what mount -o remount,rw requires. The patch replaces all_capabilities() with default_capabilities(), fourteen entries matching Docker's defaults, no CAP_SYS_ADMIN, no CAP_NET_ADMIN, no CAP_SYS_MODULE, no CAP_BPF.
The remount worked because nothing in the stack was enforcing
The PoC reduces to two commands inside the sandbox. Mount the host directory with read_only=True from the SDK side, then, from inside the guest:
$ echo pwned > /data/readonly/hack.txt
sh: /data/readonly/hack.txt: Read-only file system
$ mount -o remount,rw /data/readonly
$ echo pwned > /data/readonly/hack.txt
$ cat /data/readonly/hack.txt
pwnedThe first write fails because the guest agent mounted the share -o ro as instructed. The remount succeeds because the guest still holds CAP_SYS_ADMIN. The second write succeeds because the underlying virtio-fs device was always read-write at the host. The new content reaches the host directory's hack.txt because the share is, at the device level, a bidirectional channel.
The regression test the patch adds, in src/boxlite/tests/security_enforcement.rs, asserts the remount now fails:
async fn readonly_volume_blocks_remount(bx: &LiteBox) {
let (exit, output) = exec_full(
bx,
BoxCommand::new("sh").args(["-c", "mount -o remount,rw /data/readonly 2>&1"]),
)
.await;
assert_ne!(exit, 0, "remount rw should fail without CAP_SYS_ADMIN");
assert!(
output.contains("ermission denied")
|| output.contains("peration not permitted")
|| output.contains("not permitted")
|| output.contains("EPERM")
|| output.contains("Read-only"),
"error should indicate permission/readonly denial, got: {output}"
);
}The assertion fails closed via two distinct mechanisms in the new build. The dropped CAP_SYS_ADMIN makes the remount syscall return EPERM before it reaches the device. The device-level read-only flag on krun_add_virtiofs3 would make the remount return EROFS if the capability were ever restored. Defense in depth, after the fact. Pre-patch, neither layer existed; the guest had the capability and the device was writable.
The README's promise
The repository's README, unchanged across the vulnerable window, sells the runtime to a specific audience. It addresses operators running language-model-generated code that, by hypothesis, can be adversarial. Two of the README's bullets read "Full Freedom Inside" and "Hardware Isolation"; the second specifies "Each Box is a separate VM with its own kernel, not just namespaces." The marketing promise is that the inside-the-box adversary cannot reach the outside-the-box host, because the boundary is hardware.
In the implementation, the boundary was a log line and a mount option. The hypervisor was not enforcing read-only because the binding for the parameter did not exist. The guest was enforcing read-only because the guest, having every capability the kernel offers, was asked nicely.
This is Setting Was Advisory in its simplest form. The SGLang exhibit (CVE-2026-7669) is the variant where the library flips the flag inside a wrapper. BoxLite's variant is one step less elaborate. The flag is never passed to the enforcement layer at all. The implementation's only acknowledgement that the flag exists is the if share.read_only { "ro" } else { "rw" } ternary inside the tracing::info! macro.
CVE-2026-46695's CVSS vector is AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N. Scope changed, integrity high, confidentiality high, attack complexity low. The "network" attack vector is the LLM-generated input the sandbox was sold to contain. The "privileges required: none" reflects that the attacker is, by design, the workload.
PoC: GHSA-g6ww-w5j2-r7x3
The fix did not have to be authored. It had to be passed.