# OpenSSL Maintainers Push Back on a CVSS 9.8 Buffer Overflow Fix

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

> Hacker News story 50569226 · language: en · submitted 2026-11-20
> Web version: https://zeli.app/story/50569226
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 369 · by [JacobHenner](<https://news.ycombinator.com/user?id=JacobHenner>) · 💬 346
[original](<https://github.com/openssl/openssl/pull/33652>) · [HN discussion](<https://news.ycombinator.com/item?id=50569226>)

## Summary

A pull request aims to patch CVE-2026-121481, a buffer overflow in EVP_EncodeBlock(), by returning -1 for NULL buffers, negative lengths, and oversized inputs. The author notes the flaw is reachable via a large -proxy_pass in openssl s_client. But reviewers object: returning -1 could break third-party callers that cast the result to size_t, and some argue the reproducer is synthetic and the issue belongs in documentation.

## Key quote

> We already for STYLE.md say we should NOT add special case errors like this where we get a failure case that looks like a success.

## HN discussion (346 comments)

### [amluto](<https://news.ycombinator.com/item?id=50569705>)

> On a very very quick read, the bug is that EVP_EncodeBlock malfunctions if the input is larger than ~1.5GB.  EVP_EncodeBlock is a function that encodes base64.
>
> https://docs.openssl.org/1.0.2/man3/EVP_EncodeInit/
>
> As a seasoned C programmer, I can immediately observe that the whole API is bad: the caller is expected to calculate the buffer length on their own, using a nontrivial formula, and the caller does not pass in the output buffer length, so the implementation cannot validate it.  But apparently OpenSSL 4 also implemented it wrong and wrote (possibly far) past the end of the buffer.
>
> You should probably assume that, if you are running anything that can be convinced to use this API to encode a very long blob as base64, then you are in trouble. I don’t know why a modern server would do this.
>
> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs.  Stay away.
>
> edit: Fixed my size threshold, hopefully. I was thinking of unsigned ints, but this is a signed int. I have not looked at the code, just the description.

### [userbinator](<https://news.ycombinator.com/item?id=50569917>)

> I think CVSS 9.8 is exaggerated. This is not remotely anywhere near as serious as Heartbleed. It's an internal function which will fail if its input is far too long, but exploitability rests on how untrusted input can reach it; the key word being "untrusted". E.g. if you operate a base64 encoding service on the Internet that just reads all the data into memory at once and calls EVP_EncodeBlock(), that's exploitable. If you have a protocol that involves a block of data with a 16-bit length field which is passed to EVP_EncodeBlock(), that's 100% safe.
>
> For those wondering about TLS: speaking as someone who has written a TLS implementation, AFAIK neither base64 encoding nor decoding occurs in the protocol itself, and the longest length field is 24 bits (Hello stream). Certificate processing involves ASN.1 which does support arbitrarily-long integers, but that's a big hint to check that they're within a sensical range.

### [WalterBright](<https://news.ycombinator.com/item?id=50579343>)

> \> 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.
>
> Haven't we suffered enough yet with lack of a basic feature in C? Why are enhancements going into C that never address this fundamental problem?
>
> I wrote this proposal for C 17 years ago:
>
> file:///C:/digitalmars/articles/C-biggest-mistake.html
>
> It's a simple addition, it breaks 0 code, and provides a path forward to stop array overflows for good.
>
> It's a foundational feature for D. We don't have buffer overflows.

### [ansipunk](<https://news.ycombinator.com/item?id=50570653>)

> I am not a system administrator, but I am getting a serious vulnerability fatigue, every single day there's at least two new vulnerabilities in major pieces of software, I'm just tired of seeing that everywhere and hearing that everywhere. Fellow system administrators must be having it much worse.

### [Panzerschrek](<https://news.ycombinator.com/item?id=50570120>)

> That's why it's recommended to use size_t for passing sizes of buffers. It's unlikely to get overflow with it. In this particular case input buffer needs to have size larger than half of address space in order to trigger overflow, which isn't possible (64-bit systems usually have only 48 bits of actual address space, 32-bit systems don't allow allocating so large blocks).

### [chillax](<https://news.ycombinator.com/item?id=50572300>)

> Assessment: https://tldrcve.com/openssl-encodeblock/

### [VladVladikoff](<https://news.ycombinator.com/item?id=50569529>)

> :/
>
> I really need a day off from patching servers.

### [asveikau](<https://news.ycombinator.com/item?id=50569578>)

> Seems like only OpenSSL 4 is impacted?  What distros and systems use that?
>
> I feel like in the post heartbleed era, a lot of people are not including new features of upstream openssl as much as they used to.

### [moezd](<https://news.ycombinator.com/item?id=50570977>)

> The more I see these posts, the more I'm convinced that "never reinvent the wheel" mentality we had so far in software engineering basically covered up a lot of lazy engineering, and we just pretended everything was fine. It's like these findings cross-pollinate.

### [MarekKnapek](<https://news.ycombinator.com/item?id=50572484>)

> What about LibreSSL, BoringSSL, WolfSSL, BearSSL? Are those vial replacement for OpenSSL. I know there was a lot of fuzz back then after HeartBleed, but how about these days?

---

## Cite

- Page: https://zeli.app/story/50569226
- Date: 2026-11-20
- Source: github.com (https://github.com/openssl/openssl/pull/33652)
- Hacker News: https://news.ycombinator.com/item?id=50569226

## Other languages

- zh: https://zeli.app/zh/story/50569226 · markdown: https://zeli.app/zh/story/50569226.md
- ja: https://zeli.app/ja/story/50569226 · markdown: https://zeli.app/ja/story/50569226.md
- ko: https://zeli.app/ko/story/50569226 · markdown: https://zeli.app/ko/story/50569226.md
- de: https://zeli.app/de/story/50569226 · markdown: https://zeli.app/de/story/50569226.md
- es: https://zeli.app/es/story/50569226 · markdown: https://zeli.app/es/story/50569226.md
- ru: https://zeli.app/ru/story/50569226 · markdown: https://zeli.app/ru/story/50569226.md
