EVP_EncodeBlock() is OpenSSL’s one-shot base64 encoder: the caller hands it a buffer and a length, reserves an output buffer of the documented size, and gets the encoded text back. For input lengths close to INT_MAX, about two gigabytes, “the arithmetic that computes the encoded length overflows a signed integer, so the function writes more data than the documented output size”, which is a heap buffer overflow in the calling process. The OpenSSL project rates it Low and says plainly that “no path by which an attacker can trigger this has been identified”: its own TLS, QUIC and CMS code never encodes buffers that large, and the command-line tools cannot practically be made to. The exposure is an application that forwards an attacker-controlled length to the function without its own bound. CISA’s analysts score the same facts 5.9. Bound the length you pass to EVP_EncodeBlock() in your own code, and take OpenSSL 4.1.1 or 4.0.4 when they ship; 3.x is not affected.
CVE-2026-121481 at a glance.
| Component | OpenSSL, EVP_EncodeBlock() in crypto/evp/encode.c (the fix pull request also touches the length check in base64encode() in the HTTP client and EVP_DecodeBlock()). Outside the FIPS module boundary |
| Affected versions | OpenSSL 4.1.0 (before 4.1.1) and 4.0.0 through 4.0.3 (before 4.0.4), per the OpenSSL CNA record. Red Hat’s statement agrees that only 4.0 and 4.1 are affected upstream; Debian’s tracker nonetheless marks its 3.0, 3.5 and 3.6 packages vulnerable, a disagreement recorded below |
| Fixed in | Not yet released, and not yet merged. The record’s ranges name 4.1.1 and 4.0.4, but the fix, pull request 33652, was still open with changes requested on 1 December 2026, the CVE is not in the project’s 24 November advisory that schedules 4.1.1 / 4.0.4 / 3.5.10 for 1 December, and the downloads page still offered 4.1.0, 4.0.3 and 3.5.9 at the time this page was built. This is the field that keeps the page a draft |
| Severity | OpenSSL (CNA) Low under the project’s security policy; CISA-ADP CVSS 3.1 5.9 Medium (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, revised from an initial 9.8 per the oss-security thread); Red Hat Low, 3.7 (A:L); SUSE moderate; Ubuntu Medium; CWE-190 (integer overflow); NVD Awaiting Analysis with the CISA score |
| Exploited in the wild | Not on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.00588 (42nd percentile) on 29 November 2026 |
| Who is exposed | Applications on Linux built against OpenSSL 4.0 or 4.1 that call EVP_EncodeBlock() with a length derived from untrusted input and no bound of their own, which also means applications that already hold a two-gigabyte buffer of that input. OpenSSL’s own protocol code and command-line tools are not in the path; the record says so. Red Hat lists every RHEL release as not affected (RHEL ships 3.x) and SUSE likewise; the 4.x line is mostly found in self-built software, containers and Red Hat’s Hardened Images |
| Published | CVE record 18 November 2026 (fix pull request opened 10 November); this page built 1 December 2026, last updated 1 December 2026 |
What it is
Base64 turns every three input bytes into four output characters, and the documented reservation for EVP_EncodeBlock() is 4*((len+2)/3)+1 bytes. The function’s own version of that sum is done in int, and for len close to INT_MAX the intermediate values exceed what a signed 32-bit integer holds. The record describes the result without ceremony: the function “writes more data than the documented output size”, into a heap buffer the caller sized from the same formula, “and the result is a heap buffer overflow in the calling process”.
What makes this a Low for the project is the size of the precondition. The caller must already hold roughly two gigabytes of input, must pass that length unchecked, and must have reserved an output buffer that the overflowed arithmetic then outruns. The record walks through why OpenSSL’s own callers cannot be driven there: TLS, QUIC and CMS “never encode buffers of that size”, and in the command-line tools “the limits on reading a proxy password from a file and on bignum sizes prevent it”. The exposed caller is “an application that accepts an attacker-controlled length and forwards it to EVP_EncodeBlock() without its own bound check”, which is an application bug as much as a library one. CISA’s analysts first scored it 9.8 and then 5.9, and Alan Coopersmith of Oracle asked on oss-security why it was absent from the project’s 24 November advisory; the thread read for this page has no answer from the project.
The fix is pull request 33652 by Nicky Mouha, who also reported the issue, and its history is why this page is a draft. The first version returned an error for invalid lengths; reviewers objected that the function’s API has no error return, and the current revision instead calls OPENSSL_assert() for inputs that would lead to undefined behaviour, applies the same to EVP_DecodeBlock(), fixes a length check in the HTTP client’s base64encode() that only rejected lengths above INT_MAX, and adds tests and documentation. On 1 December it was open, targeted at master, 4.1 and 4.0, with changes requested from three reviewers and a related draft (pull request 33710) parked beside it. A release that carries it has therefore no date, and the 4.1.1 and 4.0.4 in the record’s ranges are the versions the fix is intended for rather than versions that exist.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. The enterprise distributions ship OpenSSL 3.x and are outside the record’s range; the rows say so in their own words.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Tracker unreachable on 1 December 2026 (client error, twice); nothing inferred | — |
| Debian | openssl marked vulnerable in bookworm (3.0.20-1~deb12u2; security 3.0.22-1~deb12u2), trixie (3.5.9-1~deb13u1; security 3.5.7-1~deb13u3, “postponed, fix along with future update”), forky and sid (3.6.5-1); source “(unfixed)”. Every one of those is a 3.x build outside the record’s 4.0/4.1 range, which the tracker does not comment on | nothing on 1 December 2026 |
| Ubuntu | Priority Medium; openssl “Needs evaluation” on 14.04 through 26.10; no USN. Ubuntu’s packages are 3.x | nothing on 1 December 2026 |
| RHEL, Rocky, Alma, CentOS Stream | Low, 3.7; Not affected for openssl on RHEL 6, 7, 8, 9 and 10 (3.x builds); Red Hat Hardened Images carry openssl-main 3.5.9 rebuilds in RHSA-2026:99061 and RHSA-2026:99574 (11 and 12 November); bug 2575873 | — (not affected) |
| openSUSE/SLE | Rated moderate, state Analysis; openssl and openssl-3 Not affected across SLES 15 SP5 to SP7, SLES 16.0/16.1, Leap and SLE Micro; compat-openssl098 on the SLE 12 family still “Analysis”; SUSE bug 1290865 | — (not affected) |
| Self-built OpenSSL 4.x, containers, language runtimes and appliances bundling 4.0 or 4.1 | The upstream fix applies once it is merged and released; until then the control is in the calling application | none released on 1 December 2026 |
How to check
Three questions, in order: is an OpenSSL 4.0 or 4.1 build present at all, which programs link it, and do any of them call EVP_EncodeBlock() with a length they did not bound. The first question answers “no” for every current enterprise distribution, and that ends the matter there.
# 1. which libcrypto builds are on the host (4.0.0-4.0.3 and 4.1.0 are in range; 3.x and 1.1.1 are not)
openssl version
ldconfig -p | grep -E 'libcrypto\.so' ; ls -la /usr/lib/x86_64-linux-gnu/libcrypto.so.* /usr/lib64/libcrypto.so.* /usr/local/lib*/libcrypto.so.* 2>/dev/null
find / -name 'libcrypto.so.4*' 2>/dev/null | sort -u
strings -n 8 /usr/local/lib/libcrypto.so.4 2>/dev/null | grep -m1 -E '^OpenSSL 4\.[01]\.'
# 2. running processes mapping a 4.x libcrypto
for p in $(pgrep -f '.'); do grep -l 'libcrypto\.so\.4' /proc/$p/maps 2>/dev/null | sed "s|.*|pid $p: $(tr '\0' ' ' < /proc/$p/cmdline | cut -c1-60)|"; done 2>/dev/null | sort -u
# 3. your own code: callers of EVP_EncodeBlock() and whether the length is bounded before the call
grep -rnE 'EVP_EncodeBlock|EVP_DecodeBlock' --include='*.c' --include='*.cc' --include='*.cpp' --include='*.rs' --include='*.go' /path/to/src 2>/dev/nullA host where step 1 shows only 3.x is outside the record’s range, whatever its distribution tracker says, and the Debian rows above are a tracker convention rather than a claim that 3.6 carries the bug; nothing more is needed there. A host with a 4.x build (step 1) and processes mapping it (step 2) is in range, and the question becomes step 3: a program that passes a bounded length, which every reasonable caller does, is not described by the record, and one that forwards an untrusted length is the exposed case whether or not it is ever handed two gigabytes.
How to fix it
There is no fixed release on 1 December 2026. When 4.1.1 or 4.0.4 ships with the merged fix, rebuild or upgrade and restart every process that maps the library; a running process keeps the old libcrypto until it exits. Until then the fix belongs in the calling code.
# when a release carrying PR 33652 ships: self-built 4.x
curl -O https://github.com/openssl/openssl/releases/download/openssl-4.1.1/openssl-4.1.1.tar.gz # check the downloads page first; not available on 1 December 2026
./Configure && make -j && make test && make install_sw && ldconfig
# then restart everything that mapped the old library
for p in $(pgrep -f '.'); do grep -q 'libcrypto\.so\.4.*(deleted)' /proc/$p/maps 2>/dev/null && echo "restart pid $p: $(tr '\0' ' ' < /proc/$p/cmdline | cut -c1-60)"; doneThe vendor names no workaround, and the record’s own description points at the only one that exists: the caller must bound the length. An application that caps what it passes to EVP_EncodeBlock() well below INT_MAX, which any sane limit on untrusted input already does, cannot reach the overflow on any version. What not to do: do not downgrade a 4.x deployment to 3.x “to be safe”, since 3.x carries its own set of November fixes and the move is a larger change than the risk warrants; and do not read Debian’s “vulnerable” on 3.x as a reason to act there, since the tracker, the CNA record and Red Hat agree in substance that the overflow is in the 4.x code.
/* in the calling code: bound before the call; 1 GiB is far below where the arithmetic overflows */
#define ENCODE_MAX (1024UL * 1024 * 1024)
if (inlen > ENCODE_MAX) { /* refuse, or stream through EVP_EncodeUpdate() in chunks */ }
out = OPENSSL_malloc(4 * ((inlen + 2) / 3) + 1);
outlen = EVP_EncodeBlock(out, in, (int)inlen);The streaming API (EVP_EncodeInit(), EVP_EncodeUpdate(), EVP_EncodeFinal()) is the right tool for anything large in any case, since it never needs a single two-gigabyte buffer on either side.
Sources
- CVE-2026-121481 at CVE.org — the OpenSSL CNA record (18 November 2026): the full issue, impact and description summary, the 4.1.0 and 4.0.0 to 4.0.3 ranges, the project’s Low rating, CWE-190, the FIPS note and the credit to Nicky Mouha
- OpenSSL pull request 33652 — the fix: open on 1 December 2026 with changes requested, the move from an error return to
OPENSSL_assert(), the HTTP client length check, targeted at master, 4.1 and 4.0; pull request 33710 the related draft - OpenSSL vulnerabilities page and advisory of 24 November 2026 — the four Low issues scheduled for 4.1.1 / 4.0.4 / 3.5.10 on 1 December; this CVE is not among them; downloads still offering 4.1.0, 4.0.3 and 3.5.9 when this page was built
- oss-security thread — Alan Coopersmith’s question of 24 November about this CVE’s absence from the advisory and CISA’s revised score
- NVD entry — Awaiting Analysis; published 18 November; the CISA-ADP 5.9 vector; CWE-190; no CPEs
- Distribution trackers: Debian (3.x rows marked vulnerable, postponed) · Ubuntu (Medium, needs evaluation) · Red Hat (Low 3.7, RHEL not affected, Hardened Images errata) · SUSE (moderate, not affected)
- CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00588 on 29 November 2026
Related reading
- CVE-2026-107493: OpenSSL PEM_X509_INFO_read_bio_ex frees a caller’s stack entries on failure — the 17 November OpenSSL set
- CVE-2026-124709: OpenSSL QUIC server keeps rejected streams until the connection dies — the 24 November set that is scheduled for the 4.1.1 / 4.0.4 / 3.5.10 releases
- CVE-2026-121482: OpenSSL rebuilds CRL distribution point names per CRL — same scheduled release
- CVE-2026-84786: OpenSSL DANE client crashes on a trusted CA posing as the server certificate — same scheduled release
- CVE-2026-129438: PHP 8.5 Uri\Rfc3986\Uri returns a truncated string for a URI near 2 GiB — the same
INT_MAXedge in another library the same month - Security advisories — every Linux-relevant CVE we track, newest first, with the component index
This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.
