Security Advisory

CVE-2025-12888: wolfSSL X25519 Timing Leak, ESP32

Last updated:
  • CVE-2025-12888

CVE-2025-12888 is a timing side channel in the X25519 key exchange of the wolfSSL embedded TLS library on Xtensa-based ESP32 chips, where compiler optimisations and CPU limits break the constant-time code. NVD scores it 7.5, wolfSSL rates it Low, and 5.8.4 fixes it; the wolfSSL component on the Espressif Component Registry still offers 5.8.2~1 as its newest version.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

0.3%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2025-12888 · Source: NVD

Affected components

ComponentCPEVersion range
wolfSSL (X25519 on Xtensa-based ESP32)cpe:2.3:a:wolfssl:wolfssl:5.8.2:*:*:*:*:*:*:*NVD: 5.8.2; fixed in 5.8.4 (PR 9275 makes the small X25519 implementation the default on Xtensa)
wolfssl/wolfssl component, Espressif Component Registry (ESP-IDF)—newest version 5.8.2~1 (2025-08-22) as of 2026-11-16

What does this mean for affected devices?

CVE-2025-12888 is an observable timing discrepancy (CWE-203, per wolfSSL as CNA). The 5.8.4 section of the wolfSSL ChangeLog (20 November 2025) describes timing side channels in the X25519 constant-time code "introduced by compiler optimizations and CPU architecture limitations, specifically with the Xtensa-based ESP32 chips" and recommends the low-memory X25519 implementation on Xtensa, "which is now turned on as the default for Xtensa". Adrian Cinal reported it. The fix, pull request 9275 ("Xtensa: mitigate potential non-CT assembly output"), adds a __xtensa__ block to settings.h that defines CURVE25519_SMALL, ED25519_SMALL, CURVE448_SMALL and ED448_SMALL, noting that "Compilers for Xtensa have been seen to compile C code into non-constant time assembly code".

The scores disagree widely. NVD's Primary CVSS v3.1 score is 7.5 with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, while wolfSSL's own CVSS v4.0 score is 1.0 with a physical attack vector and high complexity, and the wolfSSL vulnerabilities page rates it Low. NVD's configuration lists only wolfSSL 5.8.2 (NVD).

The firmware angle is the ESP32 toolchain. wolfSSL publishes a wolfssl/wolfssl component, described as "wolfSSL Embedded SSL/TLS Library", on the Espressif Component Registry used by ESP-IDF projects. On 2026-11-16 the registry's component API lists 27 versions, the newest being 5.8.2~1 from 2025-08-22, which predates the 5.8.4 fix. An ESP32 project that takes wolfSSL from the registry therefore gets a release without the Xtensa default, and needs either wolfSSL 5.8.4 or later from the project itself or the CURVE25519_SMALL define in its own settings.

Debian fixed it in sid with 5.8.4-1 (bug 1121204) and marks bookworm and trixie as minor issues (Debian security tracker).

CVE-2025-12888 is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0031, the 23.9th percentile, in the 2026-11-15 dataset (CISA KEV, FIRST EPSS).

For an ESP32 product, check which wolfSSL version and settings the firmware was built with and whether X25519 is used for TLS key exchange or provisioning. Our Mbed TLS and wolfSSL firmware guide covers compiler-induced timing leaks and how to find the library in an RTOS image, and our weak cryptography fix guide covers the algorithm side. A similar compiler-induced leak on 32-bit RISC-V is CVE-2026-3580, and a hardware-specific fault-injection issue on Cortex-M is CVE-2026-3503.

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • X25519 timing side channels from compiler optimisations and CPU limits on Xtensa-based ESP32; low-memory X25519 now default on Xtensa; reported by Adrian Cinal; fixed in PR 9275, release 5.8.4 (20 November 2025). — wolfSSL ChangeLog (5.8.4)
  • PR 9275 adds a __xtensa__ block in settings.h defining CURVE25519_SMALL, ED25519_SMALL, CURVE448_SMALL and ED448_SMALL. — wolfSSL pull request 9275
  • Low rating, fixed in 5.8.4. — wolfSSL security vulnerabilities page
  • NVD Primary CVSS v3.1 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N); CNA CVSS v4.0 1.0 (AV:P/AC:H); CPE lists 5.8.2. — NVD
  • wolfssl/wolfssl component: 27 versions, newest 5.8.2~1 created 2025-08-22, read 2026-11-16. — Espressif Component Registry API
  • Debian: sid fixed in 5.8.4-1 (bug 1121204); bookworm and trixie no-dsa (minor issue). — Debian security tracker
  • Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.00307 (23.9th percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. wolfSSL: Security Vulnerabilities
  3. wolfSSL ChangeLog.md (release 5.8.4)
  4. wolfSSL pull request 9275: Xtensa constant-time mitigation
  5. Espressif Component Registry: wolfssl/wolfssl
  6. Espressif Component Registry API: wolfssl/wolfssl versions
  7. Debian security tracker
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

Which devices are affected by CVE-2025-12888?

Devices built on Xtensa-based ESP32 chips that use wolfSSL's X25519 code; wolfSSL says compiler optimisations and CPU architecture limits on those chips break its constant-time behaviour (per the wolfSSL ChangeLog).

Why does NVD rate it 7.5 when wolfSSL rates it Low?

NVD's CVSS v3.1 vector treats it as a network attack with low complexity and high confidentiality impact; wolfSSL's CVSS v4.0 score of 1.0 assumes physical access and high complexity (per NVD).

What does the fix change?

wolfSSL 5.8.4 (pull request 9275) defines CURVE25519_SMALL, ED25519_SMALL, CURVE448_SMALL and ED448_SMALL whenever the compiler targets Xtensa, switching to the small implementations that are not known to have the issue (per the pull request).

Is the fixed version on the Espressif Component Registry?

As of 2026-11-16 the registry's newest wolfssl/wolfssl component version is 5.8.2~1 from 2025-08-22, older than the 5.8.4 fix, so ESP-IDF projects need a newer wolfSSL from the project or the small-implementation defines (per the Espressif Component Registry API).