Skip to content
OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-121481, CVSS 9.8)

OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-121481, CVSS 9.8)

News.Ycombinator • November 20, 2026

Important bugs affecting a released version or fixes for security issues of any severity

This fixes the buffer overflow in `EVP_EncodeBlock()` (CVE-2026-121481)

by returning `-1` for invalid inputs. It also provides a similar guard

for `EVP_DecodeBlock()`, and fixes the incorrect length check in the

`base64encode()` function of `http_client.c`. Also updates the

[NSF] Check if EVP_EncodeBlock() returns an error

The community needs to establish a consensus how to move forward with the issue or PR

fixup! [NSF] [CVE-2026-121481] Buffer overflow in EVP_EncodeBlock()

This fixes the buffer overflow in `EVP_EncodeBlock()` (CVE-2026-121481)

by calling `OPENSSL_assert()` for inputs that lead to undefined

behavior. The same fix is applied to `EVP_DecodeBlock()`, and the

incorrect length check in `base64encode()` of `http_client.c`

is fixed. Also updates the documentation and adds new tests to document

the existing behavior for zero-length inputs.

Move base64 overflow check to the internal functions

This fixes the buffer overflow in `EVP_EncodeBlock()` (CVE-2026-121481)

by calling `OPENSSL_assert()` for inputs that lead to undefined

behavior. The same fix is applied to `EVP_DecodeBlock()`, and the

incorrect length check in `base64encode()` of `http_client.c`

is fixed. Also updates the documentation and adds new tests to document

the existing behavior for zero-length inputs.

This fixes the buffer overflow in `EVP_EncodeBlock()` (

by calling `OPENSSL_assert()` for inputs that lead to undefined

behavior. The same fix is applied to `EVP_DecodeBlock()`, and the

incorrect length check in `base64encode()` of `http_client.c`

is fixed. Also updates the documentation and adds new tests to document

the existing behavior for zero-length inputs.

Add openssl_b64_diff: AVX2 vs scalar base64 differential

public API, toggling OPENSSL_ia32cap_P[2] bit 5; decode round trip as

second oracle. Mismatch raises SIGABRT (shim swallows abort()).

Vendor default 4.1.0, stale-tree guard, version in build stamp, asm

libcrypto variant, apps/include workaround for 4.1.0 Configure.

Co-Authored-By: Claude Opus 5.5

Add openssl_b64_diff; differential targets crash on mismatch

7am AI 2026-11-20: Google's Gemini can now use your Mac for you

(head ad8169a9bb, not merged yet; advisory pending) to 3.6.5:

- EVP_EncodeBlock(): stop on a negative length or one whose base64

encoding does not fit in an int (dlen > (INT_MAX / 4) * 3), where the

output length overflowed; an empty input writes only the NUL.

- EVP_DecodeBlock(): 0 for an empty input, -1 for a negative length.

- http_client.c base64encode(): reject lengths whose encoding would not

fit in an int, not only len > INT_MAX (reachable through a long

Co-Authored-By: Claude Opus 5.5

This pull request has the required number of approvals

This pull request needs review by a committer

This pull request needs review by a committer

This pull request has the required number of approvals

Add this suggestion to a batch that can be applied as a single commit.

This suggestion is invalid because no changes were made to the code.

Suggestions cannot be applied while the pull request is closed.

Suggestions cannot be applied while viewing a subset of changes.

Only one suggestion per line can be applied in a batch.

Add this suggestion to a batch that can be applied as a single commit.

Applying suggestions on deleted lines is not supported.

You must change the existing code in this line in order to create a valid suggestion.

This suggestion has been applied or marked resolved.

Suggestions cannot be applied from pending reviews.

Suggestions cannot be applied on multi-line .

Suggestions cannot be applied while the pull request is queued to merge.

Suggestion cannot be applied right now. Please check back later.

You can’t perform that action at this time.

Extracted Entities

Tools (1)