CVE-2026-34877
Critical · 9.8CVSS
9.8
EPSS
0.7%
Published
Apr 2, 2026
CISA due date
—
Cloudanix analysis
Some software using Mbed TLS can be taken over if it loads attacker-tampered saved TLS session data.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Mbed TLS versions 2.19.0 through 3.6.5 and 4.0.0 insufficiently validate or protect serialized SSL context or session structures before deserializing and reusing them. If an attacker can tamper with serialized TLS state consumed by an application, crafted values can corrupt memory inside the Mbed TLS process. Successful exploitation can lead to arbitrary code execution with the privileges of the affected application, as well as process crashes and compromise of TLS session confidentiality and integrity.
Why it matters to the business
Applications, embedded devices, gateways, appliances, and services that rely on Mbed TLS and store or exchange serialized TLS session/context data in a location an attacker can influence may be exposed to full application compromise. Because Mbed TLS is widely used in embedded and downstream software supply chains, the risk may exist indirectly through vendor firmware, SDKs, network appliances, IoT products, or bundled third-party components. Although EPSS is currently low and there is no known KEV listing or public exploit maturity reported, the CVSS severity is critical because successful exploitation can result in remote code execution without authentication in vulnerable usage patterns.
How an attack unfolds
An attacker first identifies a product or service using a vulnerable Mbed TLS version and determines whether it saves, restores, receives, or persists serialized TLS SSL context or session data. The attacker then gains the ability to alter that serialized blob, for example by modifying data stored in an untrusted client-side token, writable cache, local persistence area, shared storage location, intercepted transport, or other application-specific session persistence mechanism. The attacker crafts malformed serialized structure fields so that when the application later deserializes the data through vulnerable Mbed TLS code, memory is corrupted. With a reliable exploit, the attacker can redirect execution flow and run arbitrary code in the affected process; less reliable attempts may cause crashes, TLS handshake failures, or abnormal process restarts.
How to fix it
Upgrade Mbed TLS to a vendor-provided fixed release as soon as one is available for the affected branch, and consume fixed downstream firmware, appliance, operating system, SDK, or package releases from vendors that bundle Mbed TLS. No exact fixed versions were provided in the input, so track Arm Mbed TLS and TrustedFirmware advisories for patched versions superseding 2.19.0 through 3.6.5 and 4.0.0. Until patched, avoid accepting serialized SSL context or session structures from untrusted sources; disable TLS session/context serialization and restoration where feasible; store serialized state only in integrity-protected server-side storage; cryptographically authenticate serialized blobs before loading them; restrict write access to session caches; and restart affected services after upgrading to ensure the patched library is loaded.
How to confirm the fix worked
Inventory affected software by checking embedded library versions, package metadata, firmware software bills of materials, binary strings, and vendor advisories for Mbed TLS 2.19.0 through 3.6.5 or 4.0.0. Confirm remediation by verifying the runtime-linked or statically embedded Mbed TLS version is a patched vendor release, not only that a package manager record was updated. Review application configuration and code paths to confirm serialized SSL context or session data is not accepted from untrusted sources unless integrity-protected before deserialization. Where safe, run regression tests for TLS session persistence/resumption and negative tests using malformed serialized session/context data to confirm the process rejects invalid data without crashing. For appliances and embedded products, validate by installing the vendor firmware containing the fixed Mbed TLS component and confirming the reported build or SBOM component version.
Typical attack path
- Identify software, firmware, or services that embed Mbed TLS versions 2.19.0 through 3.6.5 or 4.0.0.
- Determine whether the application uses serialized SSL context or session save/load functionality and whether the serialized data can be influenced by an unauthenticated or remote attacker.
- Obtain or generate a legitimate serialized TLS session/context blob accepted by the target application.
- Modify structure fields inside the serialized data to trigger unsafe memory behavior during deserialization.
- Send, store, or otherwise cause the target application to consume the malicious serialized data.
- Trigger the application path that restores the serialized TLS state.
- Exploit resulting memory corruption to crash the process or execute attacker-controlled code with the affected application’s privileges.
How to detect it
Look for evidence of attempts to tamper with serialized TLS session or context data and for instability in applications that use Mbed TLS. Useful sources include application logs, TLS termination logs, reverse proxy logs, crash dumps, core files, endpoint telemetry, firmware/system logs, watchdog restart logs, and memory-safety sanitizer output from test or instrumented builds. Search for repeated process crashes, segmentation faults, illegal instruction faults, aborts, heap corruption messages, TLS session restoration failures, or anomalous client activity immediately before restarts. If symbols are present in core dumps or crash traces, look for Mbed TLS SSL/session deserialization or load routines in the crashing stack. Also review access logs or storage audit logs for unexpected writes to TLS session cache files, serialized session stores, or persistence locations used by the application. There are no public exploit-specific network payloads or malware indicators associated with this CVE in the provided data, so detection should focus on exploit behavior, crash artifacts, and unauthorized modification of serialized TLS state.
- mbedtls_ssl_context_load
- mbedtls_ssl_context_save
- mbedtls_ssl_session_load
- mbedtls_ssl_session_save
- mbedtls_ssl_context_load_file
- mbedtls_ssl_context_save_file
- SIGSEGV
- segmentation fault
- heap corruption
- malloc(): corrupted top size
- free(): invalid pointer
- double free or corruption
- AddressSanitizer: heap-buffer-overflow
- AddressSanitizer: heap-use-after-free
- core dumped
What your security team should do
- Prioritize internet-facing services, VPNs, gateways, proxies, embedded management interfaces, IoT platforms, and products that embed Mbed TLS and may process attacker-influenced TLS session state.
- Request vendor confirmation for any third-party product or firmware that includes Mbed TLS, especially where direct package-level version inspection is not available.
- Patch or upgrade affected Mbed TLS deployments once fixed releases are available; if patching is delayed, disable or tightly control serialized SSL context/session restoration.
- Treat writable or client-controlled TLS session persistence locations as high risk and protect them with server-side storage controls and cryptographic integrity checks.
- Add crash and anomaly monitoring for processes using Mbed TLS, especially repeated segmentation faults, aborts, or TLS session restoration failures after malformed or unusual client traffic.
- Review code for use of Mbed TLS SSL/session serialization APIs and ensure serialized structures are never trusted without validation and integrity protection.
- Because there is no current KEV listing, no ransomware association, and low EPSS, balance emergency response against exposure: environments with no untrusted serialized TLS state are lower risk, while exposed serialization paths remain critical.
The record
An issue was discovered in Mbed TLS versions from 2.19.0 up to 3.6.5, Mbed TLS 4.0.0. Insufficient protection of serialized SSL context or session structures allows an attacker who can modify the serialized structures to induce memory corruption, leading to arbitrary code execution. This is caused by Incorrect Use of Privileged APIs.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| openSUSE:Tumbleweed | mbedtls | 0 | 3.6.6-1.1 |
Related vulnerabilities
- CVE-2026-34876 An issue was discovered in Mbed TLS 3.x before 3.6.6. Also affects mbedtls
- CVE-2026-34873 An issue was discovered in Mbed TLS 3.5.0 through 4.0.0. Also affects mbedtls
- CVE-2026-34872 An issue was discovered in Mbed TLS 3.5.x and 3.6.x through 3.6.5 and TF-PSA-Crypto 1.0. Also affects mbedtls
- CVE-2026-34871 An issue was discovered in Mbed TLS before 3.6.6 and 4.x before 4.1.0 and TF-PSA-Crypto… Also affects mbedtls
- CVE-2026-34874 An issue was discovered in Mbed TLS through 3.6.5 and 4.x through 4.0.0. Also affects mbedtls
- CVE-2026-25835 Mbed TLS before 3.6.6 and TF-PSA-Crypto before 1.1.0 misuse seeds in a Pseudo-Random… Also affects mbedtls
- CVE-2026-25833 Mbed TLS 3.5.0 to 3.6.5 fixed in 3.6.6 and 4.1.0 has a buffer overflow in the… Also affects mbedtls
- CVE-2026-34875 An issue was discovered in Mbed TLS through 3.6.5 and TF-PSA-Crypto 1.0.0. Also affects mbedtls