Home › Intelligence › Brief
BREACH BRIEF🟠 High Advisory

Mbed TLS 4.0 Audit Finds High‑Severity Buffer Overflow and Crypto‑API Gaps

Quarkslab’s OSTIF‑commissioned audit of the newly released Mbed TLS 4.0 identified a high‑severity heap buffer overflow and several lower‑severity issues. The findings test the control objective of secure software development and configuration management, a key element of NIST CSF 2.0.

LiveThreat™ Intelligence · 📅 November 23, 2026· 📰 blog.quarkslab.com
🟠
Severity
High
AD
Type
Advisory
🎯
Confidence
High
🏢
Affected
3 sector(s)
✅
Actions
3 recommended
📰
Source
blog.quarkslab.com

Mbed TLS 4.0 Security Audit Uncovers High‑Severity Buffer Overflow and Crypto‑API Gaps

What Happened — Quarkslab was commissioned by the Open Source Technology Improvement Fund (OSTIF) to audit the newly released Mbed TLS 4.0, the open‑source TLS/DTLS/X.509 library that underpins many IoT, automotive and industrial products. The audit focused on the architectural split that moved the cryptographic primitives into a separate submodule (TF‑PSA‑Crypto) and introduced a mandatory psa_crypto_init() call.

The reviewers examined the code at commit 0fe989b6b514192783c469039edd325fd0989806 (Mbed TLS) and commit 29160dd877d29658279fd683b2ae57b320ddcf09 (TF‑PSA‑Crypto). Their scope covered four pillars: (1) the trust boundary created by the split, (2) correct usage of the PSA Cryptography API, (3) memory‑safety of SSL/DTLS context handling, and (4) the security posture of the default build configuration.

The audit identified five findings:

| ID | Title | Severity | Affected Area |

|----|-------|----------|---------------|

| HIGH‑1 | CID buffer overflow in mbedtls_ssl_context_load() | High | library/ssl_tls.c:5002 |

| LOW‑4 | mbedtls_pk_verify() accepts BER‑encoded signatures | Low | tf-psa-crypto/extras/pk.c |

| INFO‑2 | No anti‑replay protection for TLS 1.3 0‑RTT early data | Informational | include/mbedtls/ssl.h:5166 |

| INFO‑3 | Mismatch in CMAC cipher support between docs and implementation | Informational | TF‑PSA‑Crypto documentation |

| INFO‑5 | compat.sh DTLS 1.2 tests fail on IPv6 localhost in Docker image | Informational | mbedtls-test Docker images |

The high‑severity issue is a heap‑buffer overflow triggered when loading a TLS session (mbedtls_ssl_context_load()). If exploited, an attacker could corrupt memory and potentially achieve code execution on the host device. The low‑severity finding concerns signature malleability: the verification routine accepts BER‑encoded signatures, which could be abused to forge signatures under certain conditions.

All findings have been resolved in the upstream repository. The auditors praised the rapid response of the Mbed TLS maintainers and noted that the integration of Project Wycheproof test vectors helped surface the low‑severity issue.

Beyond the concrete bugs, the audit highlighted process‑level gaps: the default configuration still enables a broad set of cipher suites, and the documentation does not clearly warn about the lack of anti‑replay protection for TLS 1.3 0‑RTT early data. The reviewers recommended tighter CI/CD fuzzing, inclusion of the ANV test suite, and clearer documentation of security‑critical defaults.

The full technical report, including proof‑of‑concept code and remediation steps, is publicly available in Quarkslab’s reports repository.

Why It Matters for Trust & Control Assurance — The audit tests the control objective of secure software development and configuration management, a cornerstone of NIST CSF 2.0’s Protect function.

Who Is Affected — Vendors of IoT devices, automotive ECUs, industrial control systems, and any product that embeds Mbed TLS for TLS/DTLS communications.

Recommended Actions

  • Verify that your product ships with the latest Mbed TLS 4.0 release (commit 0fe989b6…).
  • Review your build configuration: disable unnecessary cipher suites and ensure psa_crypto_init() is called early in the boot sequence.
  • Incorporate the ANV test suite and Project Wycheproof vectors into your CI pipeline to catch similar issues early.
  • Update documentation to flag the absence of anti‑replay protection for TLS 1.3 0‑RTT early data, and consider disabling 0‑RTT if your threat model cannot tolerate replay attacks.

Source: Quarkslab Blog – MbedTLS Security Audit

Technical Notes

  • Attack vector – Heap‑buffer overflow in session‑load routine; exploitable via crafted TLS session data.
  • CVEs – None assigned yet; the issue is tracked in the upstream issue tracker and patched.
  • Data types – Affects TLS session structures, PSA key objects, and X.509 parsing code.
  • Remediation – Patch applied to ssl_tls.c (commit 0fe989b6…), signature verification hardened, documentation updated.
📰 Original Source
http://blog.quarkslab.com/mbedtls-security-audit.html ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Trust Operations

Every gap like this maps to a control you can evidence.

The Verisq AI Trust Operations platform maps incidents to your control framework and collects the evidence continuously — so your Trust Center shows proof, not promises, when a buyer or auditor asks.

Explore the Verisq AI Trust Operations platform →