Junglewise Threat Intelligence

CVE-2026-34610: leancrypto integer truncation in lc_x509_extract_name_segment

CVE-2026-34610 · Severity: medium · CVSS 5.9 · Published 2026-04-02

Executive brief

leancrypto is a cryptographic library used to provide post-quantum resistant security for digital signatures and certificates. A flaw in how the library processes digital certificates allows an attacker to create a fraudulent certificate that appears to belong to a legitimate user or organization. This could allow an attacker to impersonate a trusted entity, bypass security checks in code signing, or interfere with secure communications.

Technical details

An integer truncation vulnerability exists in the lc_x509_extract_name_segment() function of the leancrypto library. The function incorrectly casts a size_t value to a uint8_t when storing the length of a Common Name (CN) segment. By crafting a certificate with a CN containing specific padding (e.g., 256 bytes), an attacker can cause the stored length to wrap around, resulting in a parsed CN that matches a victim's identity. This enables identity impersonation during PKCS#7 verification, certificate chain matching, and code signing processes. The vulnerability is addressed in version 1.7.1 by using size_t for length storage and implementing proper bounds checking.

Affected products

  • smuellerDD leancrypto < 1.7.1

Timeline

  • 2026-03-30: patched: Version 1.7.1 released
  • 2026-03-30: advisory: GitHub Security Advisory GHSA-636g-jxv4-v4gr published
  • 2026-04-02: disclosed: CVE-2026-34610 published

References