# CVE-2026-34874: Mbed TLS NULL pointer dereference in X.509 distinguished name parsing

Source: https://junglewise.ai/threats/cve-2026-34874-mbed-tls-null-pointer-dereference-in-x-509-distinguished-name  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-01. Updated: 2026-06-05  
License: CC BY 4.0 with a link back

CVE-2026-34874 · Severity: high · CVSS 7.5 · Published 2026-04-01

Mbed TLS is a widely used security library that provides encryption and SSL/TLS capabilities for embedded devices and applications. A vulnerability in how the library processes digital certificate names could allow an attacker to crash the system or, in some specialized environments like microcontrollers, potentially take control of the device. This could lead to service outages or unauthorized access to sensitive equipment.

## Quick answers

**Is CVE-2026-34874 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-34874 being exploited in the wild.

**How severe is CVE-2026-34874?** High severity, with a CVSS score of 7.5, published 1 April 2026.

**Which products and versions are affected?** TrustedFirmware Mbed TLS 3.5.0 to 3.6.5, 4.0.0.

**Is there a fix for CVE-2026-34874?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-34874 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-34874?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A NULL pointer dereference exists in the mbedtls_x509_string_to_names() function, which is also reachable via CSR and CRT subject/issuer name setting functions. The vulnerability is triggered when a memory allocation failure occurs during parsing, leading to a memcpy() call with a NULL destination address (address 0). On systems with memory protection, this results in a segmentation fault (DoS); however, on microcontrollers without such protections, writing to address 0 may overwrite interrupt vectors, potentially allowing arbitrary code execution. The issue is fixed in Mbed TLS versions 3.6.6 and 4.1.0.

## Affected products

- TrustedFirmware Mbed TLS 3.5.0 to 3.6.5, 4.0.0

## Timeline

- 2026-03-31: advisory: Vendor security advisory published
- 2026-04-01: disclosed: CVE published to NVD

## References

- [https://mbed-tls.readthedocs.io/en/latest/security-advisories/](https://mbed-tls.readthedocs.io/en/latest/security-advisories/)
- [https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2026-03-null-pointer-dereference-x509/](https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2026-03-null-pointer-dereference-x509/)
