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.
  • Unpack the image, decide which kind of image it is, and use the evidence that kind of image carries.
  • Three classes account for most of the advisories both projects publish: 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, going back to the PolarSSL advisories of 2011.

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 the TLS and DTLS protocols and X.509 certificate handling, using the PSA Crypto API in TF-PSA-Crypto for its cryptography, 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. The result is that two devices reporting the same library version can have very different attack surfaces: one may compile in TLS 1.3, DTLS, session tickets and an OpenSSL compatibility layer, while another builds a PSK-only TLS 1.2 client.

That matters for triage. Advisories from both projects routinely say a CVE applies only when a given feature or macro is enabled, so a version match is a starting point rather than a verdict. Our OpenSSL vulnerabilities in embedded firmware guide covers the third common TLS stack, where the problem is more often a frozen end-of-life branch and distribution backports.

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

Unpack the image, decide which kind of image it is, and use the evidence that kind of image carries.

  1. Unpack and classifyExtract the filesystem with binwalk or the vendor's tooling. If you get a Linux root filesystem, the library is probably a shared object. If you get one large binary for an RTOS such as Zephyr, FreeRTOS or ThreadX, the library is compiled into it. If regions refuse to unpack, our firmware entropy analysis guide explains how to tell encryption from compression.
  2. Embedded Linux: read the library names and package recordsMbed TLS builds three libraries. The current README names them libtfpsacrypto, libmbedx509 and libmbedtls, and notes that the crypto library is 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.7", and the archived 2.28 branch uses the same form, "Mbed TLS 2.28.10". 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 and something references it. That module is enabled in the 3.6 default configuration, but size-optimised builds often remove it.
  4. wolfSSL: confirm the library before reading the numberwolfSSL's version.h defines LIBWOLFSSL_VERSION_STRING as a bare version such as 5.9.4, plus a hex form. A bare number 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, the advisory text helps: function names in the advisories, such as x509_inet_pton_ipv6() or mbedtls_ssl_session_reset(), and the error message tables both libraries embed narrow the version range. Record the result as a range, not a guessed point version.
  6. Check every component, not only the applicationA 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, with path, version and evidence, in the firmware SBOM. For TLS libraries it is worth going one level further: a cryptographic bill of materials records which protocols and algorithms the build actually enables, which is exactly the information triage needs.

Which vulnerability classes keep recurring in embedded TLS libraries?

Three classes account for most of the advisories both projects publish: 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 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 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. Every TLS client parses a certificate the peer sends before it knows whether to trust it, so parser bugs are reachable from the network. Mbed TLS's SECURITY.md states that it does not check certificates for strict X.509 compliance, but 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 the subtler version of the problem: two parsing flaws make Mbed TLS read some invalid certificates as CA certificates while most other X.509 parsers read them as end-entity certificates. The advisory's own scenario is a device whose trusted roots can be customised and are validated off-device by a different implementation, which describes many managed IoT fleets. The CVE-2026-25833 advisory is a purely embedded case: the vulnerable x509_inet_pton_ipv6() is the library's own fallback, used only "where the platform/toolchain does not provide inet_pton()", which is common on bare-metal toolchains. Our memory corruption in embedded firmware guide covers the bug class itself.

Timing side channels. Mbed TLS's threat model says it provides limited protection against timing attacks and aims to cover "publicly documented attack techniques", and it makes no guarantees against physical attacks such as power analysis or fault injection, which must be mitigated by the platform. The CVE-2026-50587 advisory describes an attacker who submits crafted ciphertexts and recovers plaintext "as a Bleichenbacher oracle", for example the pre-master secret in a TLS 1.2 RSA key exchange; it follows CVE-2024-23170, a January 2024 RSA timing advisory tied to the Marvin attack. Compilers are a recurring source: the same SECURITY.md recommends -O2 or -Os because other optimisation levels are less scrutinised, and the wolfSSL vulnerabilities page lists CVE-2025-12888, timing side channels in X25519 "introduced by compiler optimizations" on Xtensa-based ESP32 chips, 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. Newer protocol code carries more bugs per line than the parsers that have been fuzzed for a decade. The CVE-2026-34873 advisory explains how a server supporting both TLS 1.2 and 1.3, after sending a HelloRetryRequest, could resume a TLS 1.2 session "using an all-zero master secret", letting a man-in-the-middle bypass client authentication. wolfSSL's list includes a heap overflow in DTLS 1.3 ACK processing (CVE-2026-5264), a heap overflow in TLS 1.3 Encrypted Client Hello parsing (CVE-2026-3549, ECH being off by default) and a post-handshake authentication flaw (CVE-2026-55962) that only affects builds with --enable-postauth. Devices using DTLS, such as CoAP endpoints, should read our CoAP protocol security guide alongside these.

How does each project publish security advisories?

Mbed TLS publishes one page per advisory on its Security Advisories index, going back to the PolarSSL advisories of 2011. Each page has a fixed header (title, CVE, date, affected and unaffected versions, impact, severity, credits) followed by the vulnerability description, the conditions under which an application is affected, any work-around, the resolution and, on recent advisories, a table of fix commits per branch. That table comes with a caveat worth quoting to anyone planning a backport: the commits "may not apply cleanly to older versions of the library, and may not provide a complete fix even if they do apply", and the team "does not provide support outside of maintained branches."

The disclosure process is also worth knowing. The Mbed TLS vulnerability process page states that, because of export control rules, "security fixes cannot be shared privately with Trusted Stakeholders", and that fixes are often withheld until the public disclosure date because they "reveal enough information for a skilled attacker to re-construct the originally reported exploit." In practice, a device maker learns about an Mbed TLS vulnerability and its fix on the same day as everyone else, so the patching clock starts at release. The July 2026 batch shows the pattern: Mbed TLS 3.6.7, 4.1.1 and 4.2.0 were published together on 7 July 2026 on the Mbed TLS GitHub releases page, and the advisories index lists twenty advisories from that July 2026 batch.

wolfSSL publishes a single table on its security vulnerabilities page, listing CVE, severity, description, time to fix and the fixed release; it held 131 rated entries when read on 2026-11-12. The descriptions are unusually specific about configuration, often naming the exact macros and configure options that make a build affected. The same entries appear in the wolfSSL ChangeLog under each release's Vulnerabilities heading, with severity tags and the fixing pull request or commit. Release 5.9.4, dated 25 September 2026, is the newest release there.

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 in the description, with macro and configure flag names
Supported lines 3.6 LTS and 4.1 LTS (per BRANCHES.md) The current release series

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. For Mbed TLS, check the branch: CVE-2026-25832, a TLS 1.3 HelloRetryRequest group check, affects 3.5.0 through 3.6.6 but no version up to 3.4.1, according to its advisory.
  2. Is the affected feature compiled in?Read the Mbed TLS configuration (mbedtls_config.h, plus tf-psa-crypto/include/psa/crypto_config.h in 4.x) or the wolfSSL user_settings.h and configure line from the build. Mbed TLS 3.6 enables MBEDTLS_SSL_PROTO_TLS1_3 by default, so TLS 1.3 handshake advisories usually apply unless the product turned it off. wolfSSL's CVE-2026-5188 applies only to builds using the original ASN.1 parser, which is off by default, and CVE-2026-94418 only to builds with WOLFSSL_SMALL_CERT_VERIFY, reached through low-resource options such as --enable-lowresource and --enable-tinytls13.
  3. Is it reachable in how the device uses TLS?A TLS client that only talks to the vendor's cloud has different exposure from a device that accepts uploaded certificates or runs a TLS server. Mbed TLS's CVE-2026-50587 needs repeated RSA PKCS#1 v1.5 decryptions, and in Mbed TLS 3.6 mbedtls_pk_decrypt() is affected only if MBEDTLS_USE_PSA_CRYPTO is enabled, which is off in the default configuration (the PSA API path psa_asymmetric_decrypt() is affected either way).
  4. How urgent is it?No Mbed TLS or wolfSSL CVE appeared in CISA's KEV catalog version 2026.11.10, and FIRST EPSS scores on 2026-11-10 were low (0.0025 for CVE-2026-34873, 0.0058 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 the answer to question 2 or 3 is no, record a not-affected statement with the justification ("vulnerable code not present" or "not reachable") instead of leaving the finding open; our CSAF and VEX for device makers guide covers the format.

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

Stay on a maintained Mbed TLS LTS. The Mbed TLS BRANCHES.md lists mbedtls-3.6 (released March 2024, maintained until March 2027) and mbedtls-4.1 (released March 2026, maintained until March 2029) as the supported LTS branches, with an 18-month LTS cycle and three-year support each. On LTS branches the project tries "to also maintain ABI compatibility" and to avoid "any increase in code size or RAM usage", which is what makes a patch release a drop-in update on a flash-constrained device. Moving from 3.6 to 4.x is a major-version change: crypto moves into TF-PSA-Crypto and the PSA Crypto API, and the README splits configuration between mbedtls_config.h and crypto_config.h. Start that migration well before March 2027, because 3.6 stops receiving fixes then.

Track the current wolfSSL release. wolfSSL publishes fixes in its regular releases (5.8.4 in November 2025, then 5.9.0, 5.9.1, 5.9.2 and 5.9.4 through September 2026), and most entries in the time-to-fix column on its vulnerabilities page read a week or less. Read each release's NOTE section before updating: 5.9.4, for example, now rejects certificates carrying trailing bytes after the DER structure unless WOLFSSL_NO_ASN_STRICT is defined, and changes one struct's ABI.

Use configuration as a mitigation, then as hardening. Both projects name configuration work-arounds in their advisories: Mbed TLS suggests disabling TLS 1.3 client connections for CVE-2026-25832 where upgrading is not immediately possible, and wolfSSL suggests --disable-openssl-compatible-defaults for CVE-2026-93302. Beyond the immediate fix, removing protocols and features the product never uses (renegotiation, DTLS, 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.

Backport only with tests. Where a product cannot leave an archived branch, the Mbed TLS fix-commit tables are the starting point, with the project's own warning that they may not apply cleanly or completely. Run the library's test suite for the backported branch and record the patch in the SBOM.

Rebuild everything that embeds the library, then re-scan. On an RTOS image that means the whole image; on embedded Linux it means every statically linked binary, not only the shared library. Regenerate the SBOM and compare it with the previous release; our firmware diffing and patch analysis guide covers the binary side of that check, and our PSIRT setup for hardware companies guide covers publishing the fixed versions to customers.

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 so the upstream version can be matched, and matches that 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 the plain-language summary of which Mbed TLS or wolfSSL CVEs matched, which are KEV-listed or have high EPSS, and what version evidence they rest on, citing the component, version and record behind each sentence. An engineer reviews every finding before the report is delivered. The steps this guide describes as manual stay with that engineer: identifying a library compiled into a monolithic RTOS image that has no package record, reading the build configuration to decide whether a feature-gated CVE applies, and recording a not-affected decision where the vulnerable code is absent. 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 where this fits in a complete assessment, see the OWASP Firmware Security Testing Methodology guide, or device & firmware security services to have a specific image reviewed.

This guide draws on the Mbed TLS security advisories, vulnerability process page, BRANCHES.md, SECURITY.md, README and release list, the Trusted Firmware Mbed TLS project page, the wolfSSL security vulnerabilities page and ChangeLog.md, CISA's KEV catalog (version 2026.11.10) and FIRST EPSS data dated 2026-11-10, all read directly on 2026-11-12.

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.10. 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-10, 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 documentation: Security Vulnerability Processes
  8. Mbed-TLS/mbedtls on GitHub: BRANCHES.md (maintained and LTS branches)
  9. Mbed-TLS/mbedtls on GitHub: SECURITY.md (threat model)
  10. Trusted Firmware: Mbed TLS and TF-PSA-Crypto project page
  11. wolfSSL: Security Vulnerabilities
  12. wolfSSL/wolfssl on GitHub: ChangeLog.md
  13. CISA: Known Exploited Vulnerabilities (KEV) Catalog
Was this guide helpful?

In this cluster

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