wolfSSL
CVE-2025-13912
LOW
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify wolfSSL peer with mis-optimized build
-
DeliveryEstablish repeated TLS CBC sessions
-
ExploitSubmit crafted padding/MAC records
-
ExecutionMeasure verification timing variance
-
ImpactStatistically recover secret-dependent data
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V6 - Authentication Timing-safe comparisons
|
| Exploitation Conditions | Exploitation requires that wolfSSL (before 5.8.4) was compiled with an LLVM/Clang toolchain whose optimizer collapsed the mask-based constant-time implementations (e.g. MaskPadding, Hmac_UpdateFinal_CT, and routines in aes.c/dh.c/ecc.c) into secret-dependent branchy code, reintroducing observable timing discrepancies (CWE-203). The attacker must then collect a large volume of high-precision, low-jitter timing measurements of affected operations (TLS CBC padding/MAC validation, DH/ECC scalar handling, AES-GCM) to statistically recover secret-dependent data. Limiting factors: dependency on a specific vulnerable build rather than source, the per the vendor vector a local measurement position (AV:L) and required privileges/user interaction (PR:H/UI:P), high attack complexity and attack requirements (AC:H/AT:P), and only partial (low) information leakage. Only versions prior to 5.8.4 are affected. |
| Impact | This is a genuinely low-priority issue despite being a cryptographic side-channel in a security library. The authoritative signals all point the same direction: the input CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:H/UI:P) yields a base score of 1.0, EPSS is 0.15% (4th percentile), there is no CISA KEV listing, and the only referenced artifact is the vendor's own fix (wolfSSL PR #9148), not exploit code. The vulnerability is also conditional in a way raw CVSS cannot fully capture: it only manifests when LLVM/Clang optimizations transform wolfSSL's masking-based constant-time routines into branchy, data-dependent machine code - a build/toolchain-dependent precondition, not a flaw present in every deployment. One point of tension worth flagging: the vendor scored AV:L, but classic TLS CBC padding/MAC timing attacks (Lucky13 family) can in principle be mounted over the network, so the attack vector is arguably AV:N under very favorable conditions - however, the extremely high measurement precision and sample volume required (reflected in AC:H/AT:P) make practical remote exploitation improbable. Net assessment: real but marginal; defense-in-depth hardening rather than an urgent patch emergency. |
| Exploit ScenarioDerived | An attacker able to observe precise timing of a vulnerable wolfSSL peer (built with a compiler that broke the constant-time property) repeatedly submits crafted TLS CBC records and statistically correlates MAC/padding-verification timing to recover small amounts of secret-dependent plaintext or key material. No public exploit or proof-of-concept exists; the only referenced code is the vendor patch adding |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Observable timing discrepancies in wolfSSL versions before 5.8.4 can leak small amounts of secret-dependent information when the library is built with an LLVM/Clang toolchain whose optimizer converts the library's branchless, mask-based constant-time code into secret-dependent branches. The affected builds are those compiled with such a toolchain, and the flaw touches TLS CBC padding/MAC validation, HMAC finalization, AES-GCM, Diffie-Hellman agreement, and ECC scalar-handling routines; an attacker must collect large volumes of high-precision, low-jitter timing measurements of those operations to statistically recover the leaked bits. Exploitation is constrained: the vendor's CVSS 4.0 vector places the measurement position locally with high privileges and user interaction (AV:L/PR:H/UI:P, AC:H/AT:P, base score 1.0), while our independent CVSS 3.1 assessment treats the issue as network-reachable but high-complexity with only low confidentiality impact (AV:N/AC:H/PR:N/C:L), so practical risk is low. No public exploit code was identified at time of analysis and the vulnerability is not in CISA KEV; EPSS is 0.15% (4th percentile), consistent with a low-likelihood, difficult-to-exploit side channel. Note that authentication requirements differ between sources: the vendor vector implies a privileged local attacker, whereas the independent assessment assumes unauthenticated network reachability.
RemediationAI
Upgrade to wolfSSL 5.8.4 or later, which per the advisory description contains the fix; the upstream change is PR 9148 (https://github.com/wolfSSL/wolfssl/pull/9148), and because our patch data points at a pull request rather than an independently verified tagged release, confirm the fix is present in the specific release or vendor branch you consume before treating the issue as closed. Where an immediate upgrade is not feasible, the defect is build-dependent, so rebuild the affected translation units (internal.c, tls.c, aes.c, dh.c, ecc.c) with a compiler/optimization configuration that preserves the constant-time mask idioms - for example using a non-LLVM toolchain or reducing optimization for those files - accepting the performance cost that comes with suppressed optimization, and backporting the volatile qualifiers from PR 9148 if source changes are permitted. As a further compensating control, disable TLS CBC cipher suites that exercise the padding/MAC validation path and prefer AEAD suites, though this reduces interoperability with older peers and does not address the AES-GCM, DH, or ECC code paths. Because exploitation requires high-precision low-jitter timing measurements, isolating the affected service from untrusted local or co-resident measurement positions (for example avoiding co-tenancy on shared hardware and restricting which principals can benchmark the process) degrades the attack but is not a substitute for patching. Monitor the vendor advisory for any updated build guidance, since compiler-induced constant-time regressions can recur with future toolchain versions.
Affected ProductsAI
wolfSSL builds prior to version 5.8.4 are affected; the fix is delivered in 5.8.4 per the advisory description, with the upstream code change in GitHub pull request 9148 (https://github.com/wolfSSL/wolfssl/pull/9148). The exposure is conditional on build configuration rather than platform: only binaries produced by an LLVM/Clang toolchain whose optimizer transforms the mask-based constant-time implementations into non-constant-time code are vulnerable, so identical wolfSSL source may be unaffected when compiled with a toolchain that preserves the constant-time structure or with different optimization settings. The affected code paths span the TLS record layer (CBC padding/MAC validation in MaskPadding and DoDecrypt), HMAC finalization (Hmac_UpdateFinal_CT), AES-GCM decryption, Diffie-Hellman key agreement, and ECC scalar multiplication and signature sizing. No CPE strings were supplied with the report, so no authoritative CPE-based product enumeration is available beyond the affected library versions themselves.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
wolfSSL implements constant-time cryptographic primitives using branchless mask arithmetic: helper functions such as ctMaskLTE, ctMaskIntGTE, and ctMaskNotEq generate all-ones/all-zeros masks that select or accumulate values without data-dependent control flow. The upstream fix (PR 9148) shows that LLVM's optimizer could recognize these mask idioms and re-materialize them as conditional branches or simplify the resulting arithmetic, silently destroying the constant-time property. The patched code adds volatile qualifiers to the intermediate mask and accumulator variables in MaskPadding, DoDecrypt (TLS CBC padding and MAC checking in src/internal.c), Hmac_UpdateFinal_CT (src/tls.c), RIGHTSHIFTX and AES_GCM_decrypt_C (wolfcrypt/src/aes.c), wc_DhAgree_Sync (wolfcrypt/src/dh.c), and ecc_mulmod/wc_ecc_sig_size (wolfcrypt/src/ecc.c), and replaces integer division by 8 with a right shift in the ECC size computations. This is CWE-203 (Observable Discrepancy), specifically a timing side channel: the root cause is a toolchain/optimizer interaction rather than a logic error in the source, so the same source tree can be secure or vulnerable depending on the compiler and optimization flags used. Our independent assessment notes the required attacker position (local measurement with privileges and user interaction per the vendor vector), high attack complexity and attack requirements, and only partial low-bandwidth leakage; the upstream project itself is the reporter, which is typical for compiler-induced side-channel defects.
Know when Wolfssl gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:H/AT:P/PR:H/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
TLS CBC/MAC timing is network-observable (AV:N) but needs many low-jitter samples plus a mis-optimized build (AC:H); leakage is partial secret data only, so C:L and I:N/A:N.
Primary rating from Vendor (wolfssl).
CVSS VectorVendor: wolfssl
DescriptionCVE.org
Multiple constant-time implementations in wolfSSL before version 5.8.4 may be transformed into non-constant-time binary by LLVM optimizations, which can potentially result in observable timing discrepancies and lead to information disclosure through timing side-channel attacks.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
wolfSSL prior to version 3.12.2 provides a weak Bleichenbacher oracle when any TLS cipher suite using RSA key exchange i
A specially crafted x509 certificate can cause a single out of bounds byte overwrite in wolfSSL through 3.10.2 resulting
Authentication bypass in wolfSSL TLS clients built with Raw Public Key (RPK) support allows a malicious or on-path serve
wolfSSL builds that enable the WOLFSSL_TRUST_PEER_CERT macro can be induced to accept a forged clone of a trusted-peer C
Certificate forgery in the wolfSSL client (versions 5.7.2 through 5.9.2) lets a remote attacker who already holds any ce
wolfSSL (formerly CyaSSL) before 3.6.8 allows remote attackers to cause a denial of service (resource consumption or tra
In wolfSSL before 5.5.1, malicious clients can cause a buffer overflow during a TLS 1.3 handshake. Rated high severity (
An issue was discovered in wolfSSL before 5.5.0. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita
wolfSSL 4.3.0 has mulmod code in wc_ecc_mulmod_ex in ecc.c that does not properly resist timing side-channel attacks. Ra
In wolfSSL 4.1.0 through 4.2.0c, there are missing sanity checks of memory accesses in parsing ASN.1 certificate data wh
An issue was discovered in wolfSSL before 4.5.0, when single precision is not employed. Rated high severity (CVSS 7.0).
wolfSSL before 4.5.0 mishandles TLS 1.3 server data in the WAIT_CERT_CR state, within SanityCheckTls13MsgReceived() in t
NVD
CVE.org
EPSS
GitHub
Exploit-DB