A 9.8 Critical you cannot patch yet — OpenSSL's EVP_EncodeBlock overflow
A CVE that is useful to read carefully, because it is unusual in a way that is easy to miss: it is published, it is scored Critical, and there is nothing to install.
OpenSSL reserved CVE-2026-121481 on 2026-11-03 and published it on 2026-11-18. The CNA description is short and precise:
Calling
EVP_EncodeBlock()with an input length close to INT_MAX may overflow the calculation of the encoded output size and write past the end of the caller-supplied output buffer.
CISA-ADP added CWE-122 (heap buffer overflow) and CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = 9.8 Critical, with SSVC exploitation none, automatable yes, technical impact total. There is no NVD score at all — NVD has the record in Awaiting Analysis state, and in our cache the only two score rows for this CVE both come from CISA-ADP. That is the pattern we measured in who actually scores a critical CVE: the number your dashboard shows is usually not NVD's judgement, and for a two-day-old record it is usually CISA-ADP's enrichment or the CNA's own.
The arithmetic, and why the dangerous part is in the caller
EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) takes an int length and returns an int (crypto/evp/encode.c:228 on master; both code paths return (int) a size_t result from crypto/evp/enc_b64_scalar.c:127 or crypto/evp/enc_b64_avx2.c:442). Base64 produces 4 bytes per 3 input bytes plus one NUL terminator, so the output length is 4·⌈n/3⌉ + 1. That stops fitting a signed 32-bit int at a specific, computable point:
(INT_MAX / 4) * 3 = 536,870,911 × 3 = 1,610,612,733
n = 1,610,612,733 -> output 2,147,483,644 bytes <= INT_MAX fine
n = 1,610,612,734 -> output 2,147,483,648 bytes == 2^31 overflow
Roughly 1.5 GiB in, 2 GiB out. Below that, everything is well-defined; above it, the size calculation wraps.
The wrap is not mainly a problem inside the library — it is a problem for the caller's buffer size, which is the pattern OpenSSL's own HTTP client shows in crypto/http/http_client.c, where base64encode() (used for proxy credentials) guarded only if (len > INT_MAX) and then handed (int)len straight to EVP_EncodeBlock(). A caller that computes 4*len/3 in an int, wraps to a small or negative number, allocates that much, and then calls the encoder receives about two gigabytes of writes into a buffer sized in bytes. The PR fixes that check to len > (INT_MAX / 4) * 3 — the exact threshold above.
So the realistic question for your own code is not "do I call EVP_EncodeBlock?" but "does anything I maintain compute a base64 output size with int arithmetic and feed that allocation to it?"
What "fixed" currently means, and the argument about it
The fix is PR #33652, opened 2026-11-10, still open, labelled severity: important and hold: discussion. Its shape changed four times in ten days, and the direction of travel is the interesting part:
| date | what the patch did |
|---|---|
| 2026-11-10 | return -1 for NULL buffers, negative length, and lengths whose encoded size exceeds int; docs announced the behaviour change |
| 2026-11-13 | replaced all four with OPENSSL_assert() |
| 2026-11-17 | dropped the t != NULL assertion, added a comment pointing at #33812 for moving checks into the internal functions |
| 2026-11-19 | dropped the f != NULL assertion; EVP_DecodeBlock() reduced to if (n <= 0) return n == 0 ? 0 : -1; |
Reviewer pressure is visible in that sequence: t8m asked for the call sites — PEM_SignFinal() and NETSCAPE_SPKI_b64_encode() — to actually check a new error return, and esyr argued the honest fix is different in kind: write the NUL and return 0 above the limit, deprecate the function, and add EVP_EncodeBlock_ex() with a sane contract. The author's answer is that a CVE fix should not change API behaviour for third-party callers, and that encode.c already uses OPENSSL_assert() in EVP_DecodeUpdate(), which is true (encode.c:351) and also part of the disagreement.
Read the consequence rather than the labels. OPENSSL_assert() is unconditional: include/openssl/crypto.h.in:464 routes it to OPENSSL_die(), which prints an internal-error line and calls abort() (crypto/cryptlib.c:245). The -DNDEBUG that release builds get switches ossl_assert, not OPENSSL_assert. So the fix as currently shaped converts "silently write 2 GiB past a small buffer" into "abort the process immediately". For memory safety that is a strict improvement — an unbounded heap stomp is worse than a crash — but note what it means operationally: a process that today corrupts memory occasionally may tomorrow die deterministically, in production, with no return value to handle. And the follow-up PR that would have made callers handle a real error, #33710, was declared unnecessary and has sat unmerged since 2026-11-13.
The part that cannot be patched yet
The CVE record lists the affected ranges as 4.1.0 through before 4.1.1 and 4.0.0 through before 4.0.4, with defaultStatus: unaffected — and its only reference is the open PR. Check those against what actually exists (GitHub releases, 2026-11-20):
| branch | newest published release | CVE names as fixed | released? |
|---|---|---|---|
| 4.1 | 4.1.0 (2026-10-23) | 4.1.1 | no |
| 4.0 | 4.0.3 (2026-09-29) | 4.0.4 | no |
| 3.6 / 3.5 / 3.4 | 3.6.5, 3.5.9, 3.4.8 (2026-09-29) | not listed | n/a |
So: the fix versions in the CVE do not exist yet, the advisory is described as pending in the PR body, nothing is in CISA's KEV catalogue, and the patch is still being argued over. A 9.8 you cannot install is not a patching task — it is a scoping task.
One scoping detail deserves more attention than it will get: 3.x is marked unaffected, but on the 3.5 line EVP_EncodeBlock() returns evp_encodeblock_int(...), which is declared static int and accumulates the same 4-per-3 count in an int (openssl-3.5.9/crypto/evp/encode.c:222, :259). The record does not explain why 3.x is out of scope. [INFERENCE] The most likely reading is that the CNA scoped the advisory to the code path its fix touches — the 4.x split into enc_b64_scalar.c / enc_b64_avx2.c — rather than making a claim that 3.x cannot overflow the same calculation. If you run 3.x and size base64 buffers in int, verify your own arithmetic rather than taking the absence as a guarantee.
What we measured here
Before treating this as somebody else's problem we checked the estate, because the answer is version-specific and takes one command per host:
- this workstation:
OpenSSL 3.6.5 29 Sep 2026, with Node and Python both linking 3.6.5 as well; - the one long-running container here (
marlat-master, Debian 13): OpenSSL 3.5.7.
Nothing runs 4.0.x or 4.1.0, so on the record as published none of it is in the affected range. The trigger condition also does not occur in what we run: it needs a single call with an input near 1.5 GiB, and the things here that base64-encode do so on request bodies and configuration values, not on gigabyte blobs. That is a measurement of our estate on one date, not a general exemption — if you run something that hands a large document or media buffer straight into EVP_EncodeBlock(), the range check is the finding, and the version string is not.
What to do today
- Find out whether you run 4.0.x or 4.1.0 at all.
openssl versionis not enough on its own — containers and language runtimes link their own copy, which is exactly why we checked Node's and Python's built-in versions rather than the host's. - Look at callers, not just versions. Anything that computes a base64 output size with
intarithmetic and allocates from it is the actual defect;http_client.c'sif (len > INT_MAX)→if (len > (INT_MAX / 4) * 3)is the template for the fix. - Do not treat the 9.8 as actionable yet. KEV is empty, SSVC says exploitation none, and the CVSS vector is a statement about a network-reachable memory corruption, not about a demonstrated attack — the reporter's own command-line demonstration drives the bug through
openssl s_client -proxy_pass, and the value has to come from an environment variable because the argument list cannot carry a string of the size that overflows the calculation. - Watch for 4.1.1 and 4.0.4, and for the OpenSSL advisory, which is pending. When they land, this becomes a normal patch decision — including the new behaviour that a caller passing a bad length now aborts instead of corrupting memory.
Want this depth applied to your own systems?
Automated security testing from €100 with a fixed price agreed before testing begins, or see what your own website gives away in a single request.