Cloudanix VulnDB

CVE-2021-40327

Medium · 5.9

CVSS

5.9

EPSS

1.2%

Published

Jan 13, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in a security component lets an attacker who guesses an internal key number reach and use secret keys that should stay locked away, potentially exposing encrypted information.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Data Exposure
Component
Firmware
Class
Authorization Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

In Profile Small mode, the Crypto service in TF-M 1.4.0 performs no authorization check linking a caller in the NSPE to the owner of a secure key; any NSPE entity that knows a key ID can retrieve or use that key.

Why it matters to the business

Attackers with network access can obtain cryptographic keys that should remain isolated in the secure world, enabling decryption of protected data or forgery of signatures and tokens without needing legitimate ownership of those keys.

How an attack unfolds

An attacker who can reach the NSPE identifies or guesses a key ID used by the Crypto service, then issues a direct request using only that ID; because no ownership or caller-authorization check exists, the service returns or operates on the key material, allowing the attacker to decrypt traffic or sign material as the legitimate owner.

How to fix it

Upgrade TF-M to a version that enforces caller-to-key-owner authorization checks even under Profile Small; apply the fixed release that adds the missing authorization logic.

How to confirm the fix worked

Confirm the running TF-M build reports a version containing the authorization check patch; review Crypto service initialization logs for the presence of owner-binding validation; attempt key access from an unauthorized NSPE context and verify the request is now rejected.

Typical attack path

  1. Map or brute-force key IDs exposed or referenced by the Crypto service
  2. Issue Crypto service calls from the NSPE supplying only the discovered key ID
  3. Receive key material or cryptographic results without any ownership verification
  4. Use obtained keys to decrypt protected data or forge signatures/tokens

How to detect it

Review NSPE-to-Crypto service call logs for requests that supply only a raw key ID without an accompanying owner or handle token; look for repeated key retrieval attempts originating from unexpected NSPE partitions.

What your security team should do

  • Prioritize upgrade of all TF-M Profile Small deployments to the patched release
  • Audit any NSPE code that directly references Crypto service key IDs and enforce strict ownership boundaries
  • Add runtime monitoring for unexpected Crypto service calls that bypass normal key-handle validation

The record

Trusted Firmware-M (TF-M) 1.4.0, when Profile Small is used, has incorrect access control. NSPE can access a secure key (held by the Crypto service) based solely on knowledge of its key ID. For example, there is no authorization check associated with the relationship between a caller and a key owner.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:20.04:LTS arm-trusted-firmware 0 No fix
Ubuntu:22.04:LTS arm-trusted-firmware 0 No fix
Ubuntu:24.04:LTS arm-trusted-firmware 0 No fix
Ubuntu:24.10 arm-trusted-firmware 0 No fix
Ubuntu:25.04 arm-trusted-firmware 0 No fix
Ubuntu:25.10 arm-trusted-firmware 0 No fix
Ubuntu:Pro:20.04:LTS arm-trusted-firmware 0 No fix

Related vulnerabilities