Securing Every Document: How Akro Is Building Safer AI Infrastructure

A significant part of our work involves processing documents.
From extracting structured information out of complex PDFs to detecting potentially fraudulent or AI-manipulated documents, our systems routinely handle files originating from external and potentially untrusted sources.
Every document represents a potential attack surface.
A seemingly ordinary PDF, image or spreadsheet can contain malicious payloads designed to exploit vulnerabilities in document parsers, image-processing libraries or file conversion tools. Even straightforward operations, such as converting a document to another format or inspecting its raw pixels, can introduce security risks. After all, inspecting raw pixels typically requires decoding an image or rendering a document first, exposing the processing software to potentially malicious input.
For AI systems operating in regulated industries, where sensitive financial, medical and operational data is routinely processed, these risks deserve particular attention.
That’s why our engineering team has been investing in a dedicated file sandboxing architecture designed to isolate untrusted document-processing workloads from our underlying infrastructure.
Why conventional container isolation isn’t always enough
Traditional containers provide useful isolation through Linux namespaces, control groups and other kernel security mechanisms. However, containerised applications still interact with the host’s Linux kernel through system calls.
This shared kernel interface introduces an important consideration: vulnerabilities in the exposed kernel attack surface could potentially allow a compromised container to affect the host.
When processing arbitrary external documents, we wanted an additional layer of protection.
Our approach starts with the assumption that a document-processing tool could be compromised by the file it opens. We therefore introduce an additional isolation boundary that mediates interactions between untrusted document-processing workloads and the underlying operating system, limiting the potential impact of a successful exploit.
Unlike a typical code execution sandbox, our environment is specifically designed around document-processing operations, including file conversion, parsing, optical character recognition and image inspection.
While a code sandbox may execute untrusted programs directly, our file sandbox runs trusted processing tools against untrusted inputs, accounting for the possibility that those tools themselves could be exploited.
How our file sandbox works
Our architecture incorporates several complementary security mechanisms designed to minimise the potential impact of malicious files.
1. System call isolation
At the core of our sandbox is a userspace system call mediation layer that sits between document-processing applications and the host operating system.
Instead of allowing applications to interact directly with the host kernel through the conventional system call interface, our architecture handles a substantial portion of these interactions within an isolated userspace execution environment.
This reduces the host kernel interface directly exposed to potentially compromised workloads, limiting the attack surface available to malicious code.
The sandbox also maintains isolated views of system resources, including process information and filesystem access, helping prevent workloads from interacting with resources outside their intended execution boundaries.
2. Network isolation & egress restrictions
Our document-processing sandboxes operate without external network connectivity.
We disable outbound network access and DNS resolution, restricting the ability of sandboxed workloads to establish connections with external services.
This is particularly important when processing externally supplied documents. A malicious file exploiting a vulnerable parser could otherwise attempt to communicate with attacker-controlled infrastructure, retrieve additional payloads or transmit sensitive information outside the environment.
These restrictions reduce the opportunities for network-based data exfiltration, even if a document-processing component is compromised.
3. Process memory protection
We also implement process-level protections to restrict unauthorised introspection of sandboxed workloads.
Our sandboxed processing processes are marked as non-dumpable, disabling ordinary process core dumps and restricting unprivileged debugging and tracing mechanisms, such as ptrace, that could otherwise expose sensitive runtime memory.
These protections also restrict other unprivileged processes operating under the same user identity from attaching debuggers or reading memory through protected process-inspection interfaces. Processes with elevated debugging privileges may still be able to bypass these restrictions.
Combined with isolated process namespaces and mediated filesystem access, this provides additional protection against unintended interactions between workloads.
The security-performance trade-off
Stronger isolation comes with a cost.
In our internal evaluations, we’ve observed approximately 5% additional execution time on I/O-bound workloads compared with our baseline container configuration. This reflects the workloads we’ve tested, rather than a universal performance overhead.
Introducing additional mediation between applications and the underlying operating system inevitably creates some processing overhead, particularly for workloads involving frequent filesystem operations.
For document-processing systems, where reading, converting and manipulating files are fundamental operations, this overhead is measurable. Nevertheless, we’ve made a deliberate engineering decision to accept this trade-off while continuing to optimise our sandboxing architecture.
We’re exploring ways to reduce filesystem I/O overhead, improve processing efficiency and minimise the performance impact of isolation without compromising security. When dealing with sensitive financial records, medical documents and other regulated information, we believe stronger isolation is worth the additional computational cost.
Our goal is to progressively narrow this trade-off, delivering both robust security and high-performance document processing.
Security as a core product capability
As AI systems take on increasingly complex enterprise operations, their security boundaries become more important.
An AI platform that processes hundreds of thousands of external documents must account for more than model accuracy, extraction performance and inference latency. It must also consider what happens when one of those documents is deliberately malicious.
At Akro, we’re continuing to invest in the infrastructure needed to support these workloads securely. Our file sandbox is one part of that effort. It introduces additional isolation where untrusted content is processed, reduces opportunities for network-based exfiltration and limits the system resources exposed to potentially compromised processes.
No single sandbox eliminates every security risk. Sandboxing also does not guarantee that a document is authentic, its extracted information is accurate, or its converted version is safe. Effective security requires multiple complementary controls, carefully maintained processing libraries and continuous evaluation.
Security must be a core product capability, not an afterthought or a compliance checkbox. That commitment extends beyond product features and marketing materials into the architecture, infrastructure and engineering decisions behind our technology.
Sometimes, that means accepting a 5% performance overhead today while investing in ways to reduce it tomorrow. Because building trustworthy AI starts with securing the infrastructure it runs on.