Join our Newsletter — 33% off our NHI Course
Home› Guides› Capability-Based Security Guide: Object Capabilities, CHERI, Capsicum and…
Guide Application Security

Capability-Based Security Guide: Object Capabilities, CHERI, Capsicum and WASI Explained

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 10 min read
On this page

Capability-based security is an access control model in which holding an unforgeable reference to a resource is what gives you the right to use it, and code has no authority except the capabilities it has been handed. That is the opposite of the usual model, where a process runs as a user and can touch anything that user's identity is allowed to reach. The idea dates back to the 1960s, but it now underpins some of the most practical isolation technology available: CHERI hardware memory protection, FreeBSD Capsicum, the seL4 microkernel and the WebAssembly System Interface (WASI). It is also the clearest way to think about sandboxing AI agents and plugins. This guide explains the model in plain terms, then gives practitioners the detail needed to recognise, evaluate and apply capability designs.

Key takeaways

  • Authority travels with the reference. A capability both names a resource and grants specific rights to it, so there is no separate permission lookup that can be confused or bypassed.
  • No ambient authority is the core rule. WASI states it has no global namespaces at runtime; Capsicum's capability mode blocks access to global namespaces such as the file system and process IDs.
  • Least privilege becomes the default, not a review task. Code can only do what it was explicitly given, which also removes the classic confused deputy problem.
  • Capabilities exist at every layer. Hardware (CHERI), kernel (seL4, Capsicum), runtime (WASI and Wasmtime) and application (object capability languages, bearer tokens with narrow scope).
  • Revocation and delegation must be designed in. Capabilities can be copied with reduced rights and revoked, as seL4 shows, but a system that hands out broad, permanent capabilities gains little.

What it is

In everyday access control, a program asks for a resource by name ("open /etc/shadow") and the system checks the caller's identity against an access control list. The program's authority is everything its identity can reach, whether or not this task needs it. Security people call that ambient authority.

In a capability system, a program cannot name resources it has not been given. It holds a set of capabilities, each an unforgeable token that both designates an object and carries the operations allowed on it. seL4 describes a capability as a unique, unforgeable token granting permission to access a kernel-controlled object, which can be thought of as a pointer with access rights. To let another component use a resource, you pass it the capability, ideally a weaker copy.

QuestionIdentity and ACL modelCapability model
How is a resource named?Global names: paths, URLs, process IDsBy holding a reference; there is no global name to guess
Where are rights checked?At access time, against the caller's identityRights are carried by the capability itself
What can a compromised component do?Anything its identity can doOnly what its capabilities allow
How is access shared?Change the ACL or impersonatePass the capability, optionally attenuated
Confused deputy riskHigh: a privileged service can be tricked into using its own authorityLow: the service uses the capability the caller provided
Hard partsOver-broad identities, privilege creepRevocation, auditing who holds what, retrofitting existing software

How it works

Four properties make a capability system work: capabilities are unforgeable, they can only be obtained by being given (or created by the holder of a parent capability), they can be attenuated (copied with fewer rights) and they can be revoked. The main implementations apply these properties at different layers.

Hardware: CHERI

CHERI (Capability Hardware Enhanced RISC Instructions), a research project of SRI International and the University of Cambridge, extends processor instruction sets so that pointers can be replaced with architectural capabilities, described by the project as hardware-supported descriptions of permissions that refer to data, code and objects. Capabilities are protected in memory by tags, so software cannot forge one by writing bytes. In CHERI designs a capability carries bounds and permissions, and new capabilities can only be derived with equal or lesser rights, so an out-of-bounds pointer simply cannot be used. The project describes CHERI as a hybrid architecture that coexists with conventional MMU-based virtual memory, and its compartmentalisation features allow fine-grained decomposition of operating system and application code to limit the effects of vulnerabilities. Implementations include CHERI-RISC-V, Arm's experimental Morello processor and evaluation board (based on Neoverse N1), and CheriBSD, an adaptation of FreeBSD. See the Memory-Safe Languages Guide for the software side of memory safety.

Operating system: Capsicum and seL4

  • Capsicum (FreeBSD): a lightweight capability and sandbox framework that turns file descriptors into capabilities. A process calls cap_enter(2) to enter capability mode, which is inherited by children and cannot be left. In capability mode, global namespaces such as the file system and PID namespace are unavailable, so the process can only act through descriptors it already holds. cap_rights_limit(2) narrows a descriptor, for example allowing read and write but not fchmod. Process descriptors let a parent manage children without the PID namespace.
  • seL4: every kernel object is accessed through capabilities held in a thread's CSpace, built from CNodes (arrays of slots). seL4_CNode_Copy copies a capability, optionally with reduced rights; seL4_CNode_Revoke removes all capabilities derived from the original. This gives delegation and revocation as kernel primitives.

Runtime: WebAssembly and WASI

WASI's design principles state that all access to external resources is provided by capabilities, in two forms: unforgeable handles that an instance can obtain only when another instance passes them over, and link-time capabilities (imported functions) that remain refusable because they can be interposed. WASI has no ambient authorities, meaning no global namespaces at runtime. Interposition lets one component implement an interface for another, which also allows attenuation: filtered access to host functionality. Wasmtime's security documentation says its WASI filesystem APIs follow a capability-based model, so applications can only access files and directories they have been given. WASI 0.3 is described in the WASI repository as the current preview, building on 0.2 and the component model. See the WebAssembly Security Guide.

Application and network layer

The same ideas appear above the operating system: object capability programming languages and frameworks restrict code to the object references it holds, and in distributed systems a narrowly scoped, short-lived bearer token behaves like a network capability. The analogy has limits: a stolen bearer token works for anyone, so tokens need audience restriction, short lifetimes and sender constraints that true capability systems get from unforgeability. See the OAuth Token Exchange and Delegation Guide.

Why it matters

  • Memory safety at scale: CHERI's own project page says its memory protection provides strong, compatible and efficient protection against many currently widely exploited vulnerabilities, without rewriting all code at once.
  • Sandboxing untrusted code: plugins, parsers and media decoders can run with only the descriptors or handles they need. A bug in the parser cannot open the user's SSH keys because it has no way to name them.
  • AI agents and tools: an agent given ambient access to a shell, file system and network inherits all of it; a capability design gives the agent a handle to one directory, one API client with narrow scope and nothing else. This is the strongest structural answer to prompt-injected misuse and the confused deputy problem. See the AI Agent Sandboxing and Code Execution Guide and the Confused Deputy in AI Agents Guide.
  • Plugin ecosystems: extension platforms that pass explicit, scoped handles to extensions contain compromises far better than in-process plugin models. See the Plugin and Extension Architecture Security Guide for SaaS Builders.
  • Non-human identities: many NHI risks are ambient authority problems: a service account that can reach everything its role allows, used by code that needs one table. Capability thinking pushes toward per-task, per-resource credentials.

Choosing where to apply capabilities

SituationPractical capability optionEffortTrade-off
Running untrusted plugins or agent toolsWebAssembly runtime with WASI, passing only needed directories and socketsModerateLanguage and library support varies; performance overhead for some workloads
Hardening a C or C++ service on FreeBSDCapsicum: open resources, then cap_enter and limit rightsModerate; needs code changes to open resources earlyFreeBSD-specific
High-assurance embedded or critical systemseL4-based designHighSpecialist skills; strong isolation guarantees
Large legacy C/C++ code base needing memory safetyCHERI hardware and recompilation, where platforms are availableHigh today; hardware availability limitedMostly research and early adoption platforms
Cloud and SaaS integrationsNarrow, short-lived, audience-bound tokens per taskLow to moderateBearer tokens are only an approximation of capabilities

Small teams usually get the best return from runtime capabilities (WASI) and narrow tokens; operating system and hardware capability adoption suits platform vendors and high-assurance builders.

Common misconceptions

  • "Linux capabilities are the same thing." They are not. Linux capabilities split root's privileges into units such as CAP_NET_BIND_SERVICE, but a process still names resources through global namespaces. They reduce privilege; they are not object capabilities.
  • "A capability is just a permission." A permission sits in a list somewhere and is checked against an identity. A capability is the reference itself; without it the resource cannot even be named.
  • "Capabilities make revocation impossible." Revocation needs design (seL4 provides a revoke operation; runtimes can interpose a revocable wrapper), but it is achievable.
  • "Sandboxing with seccomp gives the same result." System call filtering limits which operations are allowed, but a permitted open can still reach any path the identity allows. Capability mode removes the global namespace instead.
  • "CHERI replaces memory-safe languages." CHERI and memory-safe languages are complementary: one enforces in hardware, the other prevents classes of bugs at compile time.
  • "An API key is a capability, so it is safe." A bearer secret that grants broad, long-lived access is ambient authority in disguise; it only behaves like a good capability when it is narrow, short-lived and hard to replay.
Concept or controlRelationship to capability-based security
Principle of least privilege (NIST SP 800-53 AC-6)The goal; capabilities make it structural
Access enforcement (AC-3)Capabilities are one enforcement mechanism, alongside ACLs and policy engines
Process isolation (SC-39) and security function isolation (SC-3)Capsicum, seL4 and Wasm sandboxes implement these
Memory protection (SI-16)CHERI provides hardware-enforced memory protection
Security engineering principles (SA-8)Least privilege and least common mechanism by design
NIST CSF 2.0 PR.AA-05 and PR.PS-06Least privilege access and secure software development practices
Relationship-based and fine-grained authorisationPolicy-based alternatives for application data; see the Authorisation Models Guide
Zero trustShares the assumption that no component is trusted by location or identity alone

Practitioner checklist

  • Identify components that run untrusted or high-risk code (plugins, parsers, agent tools) and list the resources each actually needs.
  • Prefer runtimes and frameworks with no ambient authority, such as WASI, and pass only specific directories, sockets and API clients.
  • On FreeBSD services, open resources first, then enter Capsicum capability mode and limit descriptor rights.
  • Design delegation with attenuation: pass reduced-rights copies, never the original broad capability.
  • Design revocation up front through interposed wrappers, short lifetimes or kernel revoke primitives.
  • Treat tokens given to agents and integrations as capabilities: per task, narrow scope, short-lived, audience-bound.
  • Track CHERI platform availability for memory-safety plans in C and C++ estates.
  • Log capability grants and use so you can audit who held what.

Standards and references

Related NHI Mgmt Group resources: WebAssembly Security Guide · AI Agent Sandboxing and Code Execution Guide · Linux Capabilities Guide · Memory-Safe Languages Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.