Cyber Resilience

CVE-2023-40271

Trustedfirmware Trusted Firmware-M 1.6.0 … 1.8.0

Public PoC
Published
08 September 2023
Modified
05 June 2026
Patch / advisory
CVSS Score v3.1 7.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS Score 0.0032 25th percentile
Risk Priority 57 floored blend · peak EPSS

Summary

CVE-2023-40271 is a high-severity Incorrect Comparison (CWE-697) vulnerability in Trustedfirmware Trusted Firmware-M. Its CVSS base score is 7.5 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Obfuscated Files or Information (T1027); ranked at the 25th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

EU & UK References

Vulnerability Data

In Trusted Firmware-M through TF-Mv1.8.0, for platforms that integrate the CryptoCell accelerator, when the CryptoCell PSA Driver software Interface is selected, and the Authenticated Encryption with Associated Data Chacha20-Poly1305 algorithm is used, with the single-part verification function (defined during the…

more

build-time configuration phase) implemented with a dedicated function (i.e., not relying on usage of multipart functions), the buffer comparison during the verification of the authentication tag does not happen on the full 16 bytes but just on the first 4 bytes, thus leading to the possibility that unauthenticated payloads might be identified as authentic. This affects TF-Mv1.6.0, TF-Mv1.6.1, TF-Mv1.7.0, and TF-Mv1.8.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1027 Obfuscated Files or Information Stealth
Adversaries may attempt to make an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
T1548 Abuse Elevation Control Mechanism Privilege Escalation
Adversaries may circumvent mechanisms designed to control privilege elevation to gain higher-level permissions.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2021-27562Same product: Trustedfirmware Trusted Firmware-M
CVE-2023-51712Same product: Trustedfirmware Trusted Firmware-M
CVE-2024-39534Shared CWE-697
CVE-2023-23766Shared CWE-697
CVE-2025-12192Shared CWE-697
CVE-2023-46009Shared CWE-697
CVE-2023-33225Shared CWE-697
CVE-2024-24621Shared CWE-697
CVE-2023-49994Shared CWE-697
CVE-2020-5849Shared CWE-697

Affected Assets

trustedfirmware
trusted firmware-m
1.6.0, 1.6.1, 1.7.0, 1.8.0

Mitigating Controls

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure development practices directly require correct logic for security comparisons and thereby prevent this class of flaw.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect incorrect comparison flaws before deployment.

prevents

Secure development lifecycle includes code review and testing that can catch incorrect comparison logic.

prevents

Application security requirements can mandate correct comparison logic for security decisions.

prevents

Secure architecture principles can require robust comparison mechanisms for access decisions.

prevents

Secure coding standards directly address avoiding incorrect comparison operators and logic.

degrades

Secure authentication mechanisms rely on correct comparison of credentials or tokens.

References