Security Advisory

CVE-2026-3580: wolfSSL ECC Timing Leak on RISC-V

Last updated:
  • CVE-2026-3580

CVE-2026-3580 is a compiler-induced timing leak in the ECC code of the wolfSSL embedded TLS library: on RISC-V RV32I targets, GCC at -O3 turns constant-time masking in sp_256_get_entry_256_9 into branches, so a local attacker could recover secret keys by timing. NVD scores it 4.7, wolfSSL rates it Low, and wolfSSL 5.9.0 fixes it.

Vulnerability summary

CVSS base score

4.7

Medium severity

EPSS score (FIRST)

0.1%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2026-3580 · Source: NVD

Affected components

ComponentCPEVersion range
wolfSSL (SP math ECC P-256 on RISC-V RV32I)cpe:2.3:a:wolfssl:wolfssl:5.8.4:*:*:*:*:*:*:*wolfSSL: 5.8.4 and earlier (NVD CPE lists 5.8.4); fixed in 5.9.0 (PR 9855)

What does this mean for affected devices?

CVE-2026-3580 is an observable timing discrepancy (CWE-203, per wolfSSL as CNA). The 5.9.0 section of the wolfSSL ChangeLog (18 March 2026) says that in wolfSSL 5.8.4 and earlier, "constant-time masking logic in sp_256_get_entry_256_9 is optimized into conditional branches (bnez) by GCC when targeting RISC-V RV32I with -O3", which "breaks the side-channel resistance of ECC scalar multiplication, potentially allowing a local attacker to recover secret keys via timing analysis". Wind Wong reported it. The ChangeLog lists pull request 9855 as the fix; that PR adds a constant-time multiplication when SP_NO_MUL_INSTRUCTION is defined and defines it "when compiling for RISC-V 32 and no multiplication extension", because the standard __muldi3 "is not constant time".

NVD gives it a Primary CVSS v3.1 score of 4.7 with vector CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N and its CPE lists wolfSSL 5.8.4; wolfSSL's own CVSS v4.0 score is 2.1 and the wolfSSL vulnerabilities page rates it Low (NVD).

The device angle is the build target. The leak needs three things together: a 32-bit RISC-V target built for the RV32I base instruction set, GCC at -O3, and wolfSSL's single-precision (SP) ECC P-256 code. A firmware build record answers all three: the -march string shows whether the multiply extension is present, the compiler flags show the optimisation level, and the wolfSSL settings show whether SP math is in use. OpenWrt lists CVE-2026-3580 among the CVEs fixed by its wolfSSL 5.9.0 update.

Debian fixed it in sid with 5.9.0-0.1 and marks bookworm and trixie as minor issues (Debian security tracker).

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

Update to 5.9.0 or later for RV32I targets, and keep wolfSSL's guidance on compiler flags in mind for any constant-time code. Our Mbed TLS and wolfSSL firmware guide covers compiler-induced timing leaks in both libraries, and our weak cryptography fix guide covers the algorithm side. The Xtensa ESP32 counterpart is CVE-2025-12888, and CVE-2026-3503, fixed in the same 5.9.0 release, covers fault injection on Cortex-M.

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

  • GCC -O3 on RISC-V RV32I turns constant-time masking in sp_256_get_entry_256_9 into bnez branches; 5.8.4 and earlier; reported by Wind Wong; fixed in PR 9855, release 5.9.0 (18 March 2026). — wolfSSL ChangeLog (5.9.0)
  • PR 9855 adds a constant-time multiplication under SP_NO_MUL_INSTRUCTION, defined for RISC-V 32 without the multiplication extension; standard __muldi3 is not constant time. — wolfSSL pull request 9855
  • Low rating, fixed in 5.9.0. — wolfSSL security vulnerabilities page
  • NVD Primary CVSS v3.1 4.7 (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N); CNA CVSS v4.0 2.1; CPE lists 5.8.4. — NVD
  • OpenWrt 5.9.0 update lists CVE-2026-3580 among fixed CVEs. — OpenWrt commit e9531860
  • Debian: sid fixed in 5.9.0-0.1; 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.00144 (3.8th 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.9.0)
  4. wolfSSL pull request 9855: RISC-V 32 no-mul constant-time multiplication
  5. OpenWrt commit: wolfssl update to 5.9.0
  6. Debian security tracker
  7. CISA KEV
  8. FIRST EPSS

Frequently asked questions

Which builds are affected by CVE-2026-3580?

wolfSSL 5.8.4 and earlier compiled by GCC with -O3 for RISC-V RV32I, where the constant-time masking in sp_256_get_entry_256_9 becomes conditional branches (per the wolfSSL ChangeLog).

Who can exploit CVE-2026-3580?

A local attacker able to measure timing. NVD's vector is local, high complexity and low privileges with high confidentiality impact, and wolfSSL describes recovery of secret keys via timing analysis of ECC scalar multiplication (per NVD and the wolfSSL ChangeLog).

Which version fixes CVE-2026-3580?

wolfSSL 5.9.0. The ChangeLog lists pull request 9855, which adds a constant-time multiplication for RISC-V 32 builds without the multiplication extension (per the wolfSSL ChangeLog and the pull request).

Is CVE-2026-3580 in the CISA KEV catalog?

No, not as of 2026-11-16 (catalog version 2026.11.13). FIRST EPSS gives it 0.0014, the 3.8th percentile, in the 2026-11-15 dataset (per CISA KEV and FIRST EPSS).