← CRA Glossary
Product Security Engineering

Principle of Least Privilege

The Principle of Least Privilege states that every component, process, or user should operate with the minimum permissions necessary to perform its function. It is a fundamental secure design principle required by the CRA's Annex I essential requirements and limits the damage an attacker can cause if any component is compromised.

The Principle of Least Privilege states that every component, process, or user should operate with the minimum permissions necessary to perform its function. It is a fundamental secure design principle required by the CRA's Annex I essential requirements and limits the damage an attacker can cause if any component is compromised.

Product Security Engineering

What Is the Principle of Least Privilege?

The Principle of Least Privilege (PoLP) is a fundamental security principle stating that any user, process, or system component should have access only to the resources and permissions it needs to perform its legitimate function — and nothing more. In product design terms, this means: network-facing services should not run as root; application processes should not have write access to firmware storage unless performing an update; individual microservices should not have access to data stores they do not need; and default user accounts should not have administrative capabilities. The principle limits the damage an attacker can cause after compromising a single component: if a vulnerable network service runs without privileges, exploiting it gives the attacker limited access to the system rather than full control.

CRA reference:Annex I

Least Privilege in CRA Essential Requirements

The CRA's Annex I requires manufacturers to minimise the attack surface of their products and implement security controls that limit the impact of compromised components. Least privilege is an essential mechanism for both:

  • Attack surface reduction: Processes running with elevated privileges are attractive targets because their compromise yields high-value access. Reducing the number of processes running with elevated permissions reduces the value and impact of each potential compromise.
  • Limiting exploit blast radius: A least-privilege architecture ensures that exploiting a vulnerability in a low-privilege network service does not directly give an attacker control over the firmware update mechanism, persistent storage, or other critical system functions.

CRA conformity assessments for higher-risk products will typically examine the privilege architecture of the product's software components as part of evaluating Annex I compliance.

CRA reference:Annex I

Implementing Least Privilege in Embedded and IoT Products

Implementing least privilege in resource-constrained embedded products requires careful design:

  • Process isolation: Run each major service (network stack, application, update agent, management interface) as a separate process with a dedicated, minimal-privilege user account.
  • Filesystem permissions: Apply strict filesystem permissions — log directories writable by logging processes only, firmware storage writable only by the update process, configuration files readable by application processes but not writable in normal operation.
  • Linux capabilities: Use Linux capabilities to grant specific elevated permissions to processes that need them (e.g., CAP_NET_BIND_SERVICE to bind to low-numbered ports) rather than running as root.
  • Sandboxing: Use seccomp, AppArmor, or SELinux profiles to restrict the system calls and file accesses available to individual processes.
  • No default root shells: Remote management interfaces (SSH, web console) should not provide root access by default — use sudo with explicit command whitelisting for administrative operations.

Least Privilege in Threat Modelling and Testing

The threat model required by CRA Annex I should explicitly analyse privilege escalation paths. Key questions in a threat model for least privilege:

  • What is the lowest-privilege entry point accessible to an unauthenticated network attacker?
  • How many privilege escalation steps are required to reach critical functions (firmware write, key access, data exfiltration)?
  • Are there any processes running at unnecessarily elevated privilege that could be downgraded?
  • What is the attack chain from initial access to full device control?

Penetration testing should specifically target privilege escalation paths — exploiting a low-severity vulnerability in a network service to achieve privilege escalation to root is a common attack pattern that least privilege is designed to block. CVD researchers frequently report privilege escalation vulnerabilities, and manufacturers should treat them seriously even when the initial access vector requires low-severity exploitation.

CVD Portal makes Principle of Least Privilege compliance straightforward.

Public CVD submission portal, acknowledgment tracking, Article 14 deadline alerts, and CSAF advisory generation. Free forever for EU manufacturers.

Start your free portal

Frequently asked

How does least privilege affect the complexity of product development?+

Implementing least privilege adds some development complexity — processes must be carefully designed with only the permissions they need, and inter-process communication must be explicitly designed where previously monolithic root processes simply accessed everything directly. This complexity is front-loaded in the design phase and should be part of the secure development lifecycle from the start. Retrofitting least privilege into a product designed without it is significantly more expensive than designing it in from the beginning — a strong argument for integrating it into the initial architecture.

What is the relationship between least privilege and default accounts?+

Least privilege directly applies to default account configuration — a core CRA Annex I requirement. Products must not ship with default passwords, and default accounts should have only the permissions necessary for their intended purpose. Consumer products should not provide root/administrator access to ordinary users by default. Where administrative access is necessary, it should require explicit elevation. The CRA's secure-by-default requirement and least privilege are aligned: the default configuration should implement least privilege for all user-accessible accounts.

Does least privilege apply to the manufacturer's build and CI/CD infrastructure as well as the product?+

Yes, and this is important for supply chain security. The CRA requires manufacturers to address security in the product development lifecycle. Build pipelines with excessive permissions can be exploited to inject malicious code into product firmware — a software supply chain attack. Applying least privilege to CI/CD systems (each build job gets only the credentials it needs; build credentials do not have write access to firmware signing keys; deployment credentials are separate from build credentials) is a CRA-relevant supply chain security control.

Browse the full CRA Compliance Checklist

See how Principle of Least Privilege fits into your complete CRA compliance programme.

View checklists →