Engineer working on a laptop connected to a device test rig, surrounded by wiring harnesses and test hardware

Firmware vulnerabilities & fixes

Mbed TLS and wolfSSL vulnerabilities in embedded firmware: identify, triage, patch

Last updated:

Mbed TLS and wolfSSL vulnerabilities in embedded firmware are fixed by finding every copy of the library and its version, checking each project's advisories and your build configuration, then moving to a maintained line: Mbed TLS 3.6 LTS (supported until March 2027), Mbed TLS 4.1 LTS (until March 2029) or wolfSSL 5.9.4, the current release on 2026-11-12.

On embedded Linux the version comes from library names and package records; in a monolithic RTOS image it comes from version strings and symbol names. Both libraries are cut down at compile time, so the build configuration decides exposure more often than with OpenSSL.

Key takeaways

  • Both libraries are designed to be cut down at compile time.
  • Find where the library lives, then read its version from file names, strings or package records.
  • Three classes account for most advisories from both projects: memory-safety bugs in certificate and ASN.1 parsing, timing side channels, and state-machine bugs in the TLS 1.3 and DTLS handshakes.
  • Mbed TLS publishes one page per advisory on its Security Advisories index.

Why are Mbed TLS and wolfSSL vulnerabilities different from OpenSSL ones?

Both libraries are designed to be cut down at compile time. The Trusted Firmware project page for Mbed TLS describes it as implementing TLS, DTLS and X.509 on top of the PSA Crypto API in TF-PSA-Crypto, with a "small code footprint" that "makes the project suitable for embedded systems"; its users include TF-A, TF-M and OP-TEE. wolfSSL takes the same approach through configure flags and user_settings.h macros. Two devices on the same version can have very different attack surfaces: one compiles in TLS 1.3, DTLS and an OpenSSL compatibility layer, another is a PSK-only TLS 1.2 client.

Advisories from both projects routinely say a CVE applies only when a given feature is enabled, so a version match is a starting point, not a verdict. Our OpenSSL vulnerabilities in embedded firmware guide covers the third common TLS stack.

How do you identify the Mbed TLS or wolfSSL version in a firmware image?

Find where the library lives, then read its version from file names, strings or package records.

  1. Unpack and classifyExtract the filesystem with binwalk or the vendor's tooling. A Linux root filesystem usually means a shared library; one large binary for an RTOS such as Zephyr, FreeRTOS or ThreadX means the library is compiled in. Our firmware entropy analysis guide helps with regions that refuse to unpack.
  2. Embedded Linux: read library names and package recordsThe current Mbed TLS README names its three libraries libtfpsacrypto, libmbedx509 and libmbedtls, with the crypto library also provided under its legacy name libmbedcrypto. OpenWrt splits Mbed TLS into per-ABI packages such as libmbedtls12, and wolfSSL usually appears as libwolfssl. The opkg or dpkg record gives the version and revision.
  3. Mbed TLS: search for the full version stringThe 3.6 branch's build_info.h defines MBEDTLS_VERSION_STRING_FULL as "Mbed TLS 3.6.8", and 2.28 uses the same form. A strings pass with a grep for Mbed TLS (and mbed TLS or PolarSSL for very old builds) finds it when the version module, MBEDTLS_VERSION_C, is compiled in; it is on in the 3.6 default configuration, but size-optimised builds often remove it.
  4. wolfSSL: confirm the library before reading the numberwolfSSL's LIBWOLFSSL_VERSION_STRING is a bare version such as 5.9.4, which is ambiguous in a large binary, so first confirm wolfSSL through its wolfSSL_ and wc_ function names or error strings, then look for the version near them.
  5. Fall back to code fingerprintsWhen no string survives, function names from the advisories and the embedded error message tables narrow the version range. Record a range, not a guessed version.
  6. Check every componentA device can carry Mbed TLS in the bootloader or secure firmware (TF-A and TF-M both use it), wolfSSL in the application, and OpenSSL on a companion Linux processor. Our U-Boot bootloader security guide covers the boot stage.

Record each copy as its own component in the firmware SBOM; a cryptographic bill of materials also records which protocols and algorithms the build enables.

Which vulnerability classes keep recurring in embedded TLS libraries?

Three classes account for most advisories from both projects: memory-safety bugs in certificate and ASN.1 parsing, timing side channels, and state-machine bugs in the TLS 1.3 and DTLS handshakes.

Class Example Severity (per project) Affected / fixed
X.509 parsing Mbed TLS CVE-2026-49300, end-entity certificates read as CA certificates via invalid basicConstraints High Up to 3.6.6 and 4.0.0–4.1.0; fixed in 3.6.7, 4.1.1, 4.2.0
X.509 parsing, platform-dependent Mbed TLS CVE-2026-25833, buffer underflow in x509_inet_pton_ipv6() Low 3.5.0–3.6.5 and 4.0.0; fixed in 3.6.6, 4.1.0
ASN.1 named data Mbed TLS CVE-2025-48965, NULL pointer dereference after mbedtls_asn1_store_named_data() handles a crafted name string Medium Up to 3.6.3; fixed in 3.6.4
ASN.1 parsing wolfSSL CVE-2026-5188, integer underflow in Subject Alternative Name parsing Low Fixed in 5.9.1
Signature checks wolfSSL CVE-2026-5194, digest size and OID checks missing in signature verification Critical Fixed in 5.9.1
Timing side channel Mbed TLS CVE-2026-50587, Bleichenbacher-style oracle in RSA PKCS#1 v1.5 decryption Medium 2.17.0–3.6.6 and 4.0.0–4.1.0; fixed in 3.6.7, 4.1.1, 4.2.0
Compiler-induced timing wolfSSL CVE-2025-12888, X25519 timing leak on Xtensa (ESP32) Low Fixed in 5.8.4
TLS 1.3 handshake Mbed TLS CVE-2026-34873, client impersonation while resuming a TLS 1.3 session High 3.5.0–3.6.5 and 4.0.0
DTLS handshake Mbed TLS CVE-2026-50713, heap corruption after early renegotiation in DTLS High 3.6.3–3.6.6; fixed in 3.6.7
DTLS 1.3 handshake wolfSSL CVE-2026-5264, heap buffer overflow in DTLS 1.3 ACK processing High Fixed in 5.9.1

Certificate and ASN.1 parsing. A client parses the peer's certificate before trusting it, so parser bugs are network-reachable. The same class has hit other embedded TLS libraries: Cisco Talos report TALOS-2017-0276 describes a heap buffer overflow in the X.509 certificate parsing of InsideSecure MatrixSSL 3.8.7b, triggered by a crafted certificate presented to a client or server (CVE-2017-2780, 8.1 per Talos, 9.8 per NVD). Mbed TLS's SECURITY.md says that if a certificate "causes undefined behavior when it is parsed by Mbed TLS, that is considered a security vulnerability." The CVE-2026-49300 advisory shows a subtler problem: Mbed TLS reads some invalid certificates as CA certificates while most other parsers read them as end-entity certificates, which matters where trusted roots are customised and validated off-device, as in many managed IoT fleets. The CVE-2026-25833 advisory is purely embedded: the vulnerable fallback is used only "where the platform/toolchain does not provide inet_pton()", common on bare-metal toolchains. See our memory corruption guide.

Timing side channels. Mbed TLS's threat model offers limited protection against timing attacks and makes no guarantees against physical attacks such as power analysis or fault injection, which the platform must mitigate. wolfSSL now treats some fault attacks as vulnerabilities: its vulnerabilities page rates CVE-2026-3503 Low, a flaw in the ML-KEM and ML-DSA code on ARM Cortex-M where induced transient faults corrupt or redirect seed and pointer values during Keccak-based expansion, and pull request #9734 hardens that code against faulting; the CVE record lists 5.8.2 up to, but not including, 5.9.0 as affected, so a microcontroller that uses wolfCrypt for post-quantum keys should be on 5.9.0 or later. The CVE-2026-50587 advisory describes recovering plaintext "as a Bleichenbacher oracle", for example the pre-master secret in a TLS 1.2 RSA key exchange. Compilers are a recurring source: SECURITY.md recommends -O2 or -Os, and the wolfSSL vulnerabilities page lists CVE-2025-12888, X25519 timing side channels "introduced by compiler optimizations" on ESP32, and CVE-2026-3580, where GCC at -O3 turned constant-time masking into branches on RISC-V RV32I.

TLS 1.3 and DTLS handshake logic. The CVE-2026-34873 advisory explains how a server supporting TLS 1.2 and 1.3 could, after a HelloRetryRequest, resume a TLS 1.2 session "using an all-zero master secret". The CVE-2026-50713 advisory rates its DTLS heap corruption as possible remote code execution, but only where renegotiation is enabled and the application sets a bad-MAC limit. wolfSSL's list adds a heap overflow in TLS 1.3 Encrypted Client Hello parsing (CVE-2026-3549, ECH off by default) and a post-handshake authentication flaw (CVE-2026-55962) affecting only --enable-postauth builds. DTLS devices: see our CoAP protocol security guide.

How does each project publish security advisories?

Mbed TLS publishes one page per advisory on its Security Advisories index. Each page gives CVE, date, affected and unaffected versions, impact, severity, the conditions under which an application is affected, any work-around and, on recent advisories, fix commits per branch, with the warning that they "may not apply cleanly to older versions of the library, and may not provide a complete fix even if they do apply."

The Mbed TLS vulnerability process page states that, because of export control rules, "security fixes cannot be shared privately with Trusted Stakeholders", so a device maker learns about a vulnerability and its fix on the same day as everyone else. The July 2026 batch shows the pattern: 3.6.7, 4.1.1 and 4.2.0 were published together on 7 July 2026 on the Mbed TLS releases page, with twenty advisories.

wolfSSL publishes a single table on its security vulnerabilities page with CVE, severity, description, time to fix and fixed release. The descriptions usually name the exact macros and configure options that make a build affected. The wolfSSL ChangeLog repeats them per release, with the fixing pull request or commit.

Mbed TLS wolfSSL
Where One page per advisory on mbed-tls.readthedocs.io One table on wolfssl.com plus each ChangeLog release section
Version data Affected and not-affected ranges per branch Affected range in the description, fixed-in release column
Fix references Fix commits per maintained branch Fixing PR or commit in the ChangeLog
Configuration conditions "Affected versions" and "Work-around" sections Inline, with macro and configure flag names

How do you triage a matched Mbed TLS or wolfSSL CVE?

Ask four questions, in order, and record the answer to each.

  1. Is the version really in range?Compare against the advisory's own affected and not-affected lists, not only the NVD range. CVE-2026-25832, a TLS 1.3 HelloRetryRequest group check, affects 3.5.0 through 3.6.6 but nothing up to 3.4.1, according to its advisory. The reverse gap exists too. Mbed TLS's 7 July 2026 advisories name 19 CVE ids, and 17 of them, including these four, are CVE ids assigned by the project with no public CVE record as of 2026-12-01: CVE-2026-49300, CVE-2026-50587, CVE-2026-50588 and CVE-2026-50713. CVE.org returns no record for them and NVD has no entry, so a scanner that matches only NVD data does not report them. Check those four against the advisory ranges directly.
  2. Is the affected feature compiled in?Read the Mbed TLS configuration (mbedtls_config.h, plus crypto_config.h in 4.x) or the wolfSSL user_settings.h and configure line. The Mbed TLS 3.6 default configuration enables TLS 1.3, DTLS, renegotiation, session tickets and the RSA key exchange, and leaves EC J-PAKE, TLS 1.3 early data and MBEDTLS_USE_PSA_CRYPTO off. wolfSSL's CVE-2026-5188 applies only to builds using the original ASN.1 parser, off by default, and CVE-2026-94418 only to builds with WOLFSSL_SMALL_CERT_VERIFY, reached through options such as --enable-lowresource.
  3. Is it reachable in how the device uses TLS?A cloud-only client differs from a device that accepts uploaded certificates or runs a TLS server. CVE-2026-50587 needs repeated RSA PKCS#1 v1.5 decryptions; in 3.6, mbedtls_pk_decrypt() is affected only with MBEDTLS_USE_PSA_CRYPTO enabled.
  4. How urgent is it?No Mbed TLS or wolfSSL CVE appeared in CISA's KEV catalog version 2026.11.27, and FIRST EPSS scores on 2026-11-28 were low (0.0049 for CVE-2026-34873, 0.0029 for CVE-2026-5194). Rank instead by the project's severity, network reachability and what the TLS link protects; our KEV and EPSS prioritisation guide covers how the signals combine.

When question 2 or 3 answers no, record a not-affected statement with its justification instead of leaving the finding open; our CSAF and VEX for device makers guide covers the format.

What does the triage look like on one device? A worked example

Synthetic example for illustration; not a real product. A battery-powered sensor runs an RTOS image with Mbed TLS 3.6.4 compiled in. It is a DTLS 1.2 client to the vendor's cloud using ECDHE-ECDSA and a fixed root certificate, calls mbedtls_ssl_set_hostname(), and was built from the default configuration with TLS 1.3 removed. It never enables renegotiation at runtime and sets no bad-MAC limit.

CVE (affected range) Condition on this device Verdict
CVE-2026-49300 (up to 3.6.6) Parses the server's certificate chain Affected
CVE-2026-50713 (3.6.3–3.6.6) Renegotiation compiled in, off at runtime; no bad-MAC limit Code present, not reachable
CVE-2026-34873 (3.5.0–3.6.5) TLS 1.3 compiled out Not affected
CVE-2026-25832 (3.5.0–3.6.6) TLS 1.3 compiled out Not affected
CVE-2026-50588 (3.3.0–3.6.6) EC J-PAKE off (default) Not affected
CVE-2026-50587 (2.17.0–3.6.6) No RSA decryption in an ECDHE-ECDSA handshake Not reachable
CVE-2026-25833 (3.5.0–3.6.5) Depends on whether the toolchain provides inet_pton() Check the build

The outcome: move to the latest patch release on the same LTS line, an ABI-compatible update, and record not-affected statements for the five rows that do not apply. Matching the version against the advisory ranges reports all seven as open. 3.6.7 is the first release that fixes all seven; 3.6.8, published on 16 November 2026, is the latest 3.6 release on 2026-11-21 and also fixes the November 2026 advisories, which need the same four questions.

How do you patch Mbed TLS and wolfSSL in a device?

Stay on a supported line. The Mbed TLS BRANCHES.md plans an 18-month LTS cycle with three years of support each:

Line Released Security fixes
Mbed TLS 2.28 LTS — Ended: 2.28.10 of 24 March 2025 is "the last release of the 2.28 LTS"
Mbed TLS 3.6 LTS March 2024 Until March 2027
Mbed TLS 4.0 15 October 2025 No longer a maintained branch
Mbed TLS 4.1 LTS March 2026 Until March 2029
wolfSSL Single release series Current release 5.9.4, 25 September 2026

On LTS branches the project tries "to also maintain ABI compatibility" and to avoid "any increase in code size or RAM usage", which makes a patch release a drop-in update on a flash-constrained device. Moving from 3.6 to 4.x is a major change: crypto moves into TF-PSA-Crypto and the PSA Crypto API, so start well before March 2027. wolfSSL ships fixes in regular releases (5.8.4 in November 2025, then 5.9.0, 5.9.1, 5.9.2 and 5.9.4); read each release's NOTE section first, since 5.9.4 now rejects certificates with trailing bytes after the DER structure unless WOLFSSL_NO_ASN_STRICT is defined.

Use configuration as a mitigation, then as hardening. Mbed TLS suggests disabling TLS 1.3 client connections for CVE-2026-25832 where upgrading must wait, and wolfSSL suggests --disable-openssl-compatible-defaults for CVE-2026-93302. Removing features the product never uses (renegotiation, DTLS, EC J-PAKE, the OpenSSL compatibility layer, RSA key exchange) shrinks the code future advisories can land in. Our weak cryptography in embedded firmware guide covers the algorithm side.

Rebuild and re-scan. Rebuild everything that embeds the library, including static binaries; backport only with the library's test suite, and record the patch. Compare the new SBOM with the previous release (firmware diffing and patch analysis), and publish fixed versions through your PSIRT.

What are the common Mbed TLS and wolfSSL configuration mistakes?

  • Reading compile-time and runtime defaults as one. MBEDTLS_SSL_RENEGOTIATION is defined in the 3.6 default configuration, yet the CVE-2026-50713 advisory notes renegotiation "is disabled by default" at runtime. Record both.
  • Building with --enable-all or --enable-distro. These switch on features that are otherwise off. The wolfSSL ChangeLog for 5.9.4 rates CVE-2026-89136, unsolicited Raw Public Key acceptance in 5.6.0 to 5.9.2, High, and says RPK "is off by default" and only enabled by --enable-rpk, --enable-all or --enable-distro.
  • Never calling mbedtls_ssl_set_hostname(). The CVE-2025-27809 advisory explains that up to 3.6.2 a client that skips it silently skips the name check; newer releases fail the handshake instead, so an upgrade can break such clients.
  • Staying on 2.28. It receives no fixes, including those of the 2026 batches.

AI-assisted analysis: what the scan does and does not do

SoftWSP's scan works from the firmware's software bill of materials. When the SBOM lists Mbed TLS or wolfSSL as a package, for example OpenWrt's libmbedtls12 or a wolfssl package, it maps the package name to the NVD CPE the CVEs are filed under (arm:mbed_tls or wolfssl:wolfssl), strips the opkg revision, and matches the version against CVE records, CISA's KEV catalog and FIRST's EPSS scores. That matching is deterministic code: the code scores, and AI narrates.

AI then writes a plain-language summary citing the component, version and record behind each sentence, and an engineer reviews every finding before delivery. The manual steps in this guide stay with that engineer: finding a library compiled into an RTOS image with no package record, reading the build configuration, and recording not-affected decisions. Because matching is version-based, a build with TLS 1.3 compiled out is still flagged for a TLS 1.3 advisory until that review closes it.

For the full assessment, see the OWASP Firmware Security Testing Methodology guide, or device & firmware security services to have a specific image reviewed.

Sources: Mbed TLS advisories, vulnerability process page, BRANCHES.md, SECURITY.md, README, default configuration and releases, the Trusted Firmware project page, the wolfSSL vulnerabilities page and ChangeLog.md, CISA KEV and FIRST EPSS, read 2026-11-12 and re-checked 2026-11-14; CVE ids re-checked against CVE.org, NVD and the Mbed TLS advisories and releases on 2026-11-21 and again on 2026-12-01; KEV status rechecked against catalog version 2026.11.27 and EPSS against FIRST data dated 2026-11-28 on 2026-11-29.

Put this guide to work

Frequently asked questions

How do I tell whether a firmware image uses Mbed TLS or wolfSSL, and which version?

On an embedded Linux image, look for the shared libraries first: Mbed TLS ships as libmbedtls, libmbedx509 and libmbedcrypto (libtfpsacrypto in the 4.x series), and wolfSSL as libwolfssl, usually with an opkg or dpkg package record next to them. On an RTOS or bare-metal image the library is compiled into one binary, so search it for strings instead. Mbed TLS defines MBEDTLS_VERSION_STRING_FULL as text such as "Mbed TLS 3.6.7", which appears in the binary when the version module is linked in. wolfSSL's LIBWOLFSSL_VERSION_STRING is a bare number such as 5.9.4, so confirm the library first through its wolfSSL_ and wc_ function names or error strings, then read the version near them.

Which Mbed TLS branches still get security fixes?

The project's BRANCHES.md lists two long-time support branches: mbedtls-3.6, released in March 2024 and supported until March 2027, and mbedtls-4.1, released in March 2026 and supported until March 2029. Its SECURITY.md states that only those maintained branches get security fixes. Branches renamed with an archive/ prefix, such as archive/mbedtls-2.7, receive no further changes, so a device still on 2.28 or an older 3.x minor release has to move to 3.6 or 4.1 or backport fixes itself.

Where does wolfSSL publish its security fixes?

In two places. The wolfSSL security vulnerabilities page lists every known CVE with its severity, a description that usually names the build options that make a device affected, the time the project took to fix it and the release that contains the fix. The ChangeLog.md in the wolfSSL GitHub repository repeats each release's vulnerabilities in a Vulnerabilities section with the fixing pull request or commit; release 5.9.4 of 25 September 2026, for example, opens with a High-rated certificate verification flaw, CVE-2026-93302.

Are Mbed TLS or wolfSSL CVEs in CISA's Known Exploited Vulnerabilities catalog?

No Mbed TLS or wolfSSL CVE appeared in CISA's KEV catalog version 2026.11.27. That does not make them low priority on a device: FIRST EPSS scores for recent entries such as CVE-2026-34873 (Mbed TLS TLS 1.3 client impersonation) and CVE-2026-5194 (wolfSSL signature digest checks) were below 0.01 on 2026-11-28, so for these libraries reachability on the device and the vendor's severity rating carry more weight than exploitation data.

Does SoftWSP find Mbed TLS or wolfSSL that is compiled into an RTOS binary?

SoftWSP's matching works from the firmware's software bill of materials. When the SBOM carries Mbed TLS or wolfSSL as a package, for example OpenWrt's libmbedtls12 or a wolfssl package, SoftWSP maps it to the NVD CPE (arm:mbed_tls or wolfssl:wolfssl), strips the opkg revision and matches the version against CVE, CISA KEV and FIRST EPSS data. A library statically compiled into a single RTOS image with no package record is identified by an engineer from strings and symbols during review, and the configuration questions this guide describes stay with that engineer.

Sources

  1. Mbed TLS documentation: Security Advisories (index)
  2. Mbed TLS: X.509 CA bit forgery via invalid basicConstraints extension (CVE-2026-49300), 7 July 2026
  3. Mbed TLS: Buffer underflow in x509_inet_pton_ipv6() (CVE-2026-25833), 31 March 2026
  4. Mbed TLS: Timing side-channel in RSA PKCS#1 v1.5 decryption (CVE-2026-50587), 7 July 2026
  5. Mbed TLS: Client impersonation while resuming a TLS 1.3 session (CVE-2026-34873), 31 March 2026
  6. Mbed TLS: TLS 1.3 client accepts HelloRetryRequest selecting an unadvertised group (CVE-2026-25832), 7 July 2026
  7. Mbed TLS: Heap corruption with early renegotiation after corrupted record in DTLS (CVE-2026-50713), 7 July 2026
  8. Mbed TLS: Out-of-bounds read in TLS 1.2 EC J-PAKE ServerKeyExchange parsing (CVE-2026-50588), 7 July 2026
  9. Mbed TLS: TLS clients may unwittingly skip server authentication (CVE-2025-27809), 24 March 2025
  10. Mbed TLS documentation: Security Vulnerability Processes
  11. Mbed-TLS/mbedtls on GitHub: BRANCHES.md (maintained and LTS branches)
  12. Mbed-TLS/mbedtls on GitHub: SECURITY.md (threat model)
  13. Mbed-TLS/mbedtls on GitHub: mbedtls_config.h, 3.6 LTS default configuration
  14. Mbed-TLS/mbedtls on GitHub: releases (3.6.7, 4.1.1 and 4.2.0 of 7 July 2026; 3.6.8, 4.1.2 and 4.3.0 of 16 November 2026)
  15. Mbed-TLS/mbedtls on GitHub: release 2.28.10, the last release of the 2.28 LTS (24 March 2025)
  16. Trusted Firmware: Mbed TLS and TF-PSA-Crypto project page
  17. wolfSSL: Security Vulnerabilities
  18. wolfSSL/wolfssl on GitHub: ChangeLog.md
  19. CISA: Known Exploited Vulnerabilities (KEV) Catalog
Was this guide helpful?

In this cluster

Mbed TLS and wolfSSL vulnerabilities in embedded firmware: identify, triage, patch