CVE-2021-40327
Medium · 5.9CVSS
5.9
EPSS
1.2%
Published
Jan 13, 2022
CISA due date
—
Cloudanix analysis
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
- Map or brute-force key IDs exposed or referenced by the Crypto service
- Issue Crypto service calls from the NSPE supplying only the discovered key ID
- Receive key material or cryptographic results without any ownership verification
- 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
- CVE-2023-49100 Trusted Firmware-A (TF-A) before 2.10 has a potential read out-of-bounds in the SDEI… Also affects arm-trusted-firmware
- CVE-2022-47630 Trusted Firmware-A through 2.8 has an out-of-bounds read in the X.509 parser for parsing… Also affects arm-trusted-firmware
- CVE-2026-96391 Missing Authorization vulnerability in Drupal Webform REST allows Forceful Browsing. CWE-862
- CVE-2026-96380 Missing Authorization vulnerability in Drupal CSS Usage Analyzer allows Forceful Browsing. CWE-862
- CVE-2026-96386 Missing Authorization vulnerability in Drupal Smart Content allows Forceful Browsing. CWE-862
- CVE-2026-87955 Missing Authorization vulnerability in Drupal Ultimate Table Field allows Forceful… CWE-862
- CVE-2026-87954 Missing Authorization vulnerability in Drupal Taxonomy Term Glossary allows Forceful… CWE-862
- CVE-2026-87943 Missing Authorization vulnerability in Drupal SAML SSO - Service Provider allows Forceful… CWE-862