Pull to refresh
Logo
OpenSSL fixes a base64 overflow that needs gigabyte inputs to trigger

OpenSSL fixes a base64 overflow that needs gigabyte inputs to trigger

New Capabilities

Rated 9.8, fixed in 4.1.1 and 4.0.4, and reachable only by callers that encode multi-gigabyte blobs

Overview

Updated 11 hours ago

OpenSSL's base64 encoder sizes its output with the formula 4 * ((len + 2) / 3). For inputs above roughly 1.5 gigabytes that multiplication overflows a 32-bit integer, and the encoder writes past the buffer its caller allocated.

The flaw is CVE-2026-121481, rated 9.8 and fixed in OpenSSL 4.1.1 and 4.0.4. Reaching it requires a caller that hands the function a blob close to two gigabytes long. Whether that is possible depends on the application, and the argument now is what a 9.8 score should mean for a bug most servers cannot trigger.

Why it matters

OpenSSL and its forks carry most of the web's HTTPS traffic. Reaching this bug takes a multi-gigabyte input that few servers will ever encode.

Questions about this story

Free account needed to ask — your question is kept and asked for you right after sign-up. Answers are public.

No questions yet — be the first to ask.

Key Indicators

9.8
CVSS v3.1 base score
Rated critical by the National Vulnerability Database for a network-reachable, low-complexity flaw.
2
OpenSSL release lines affected
4.0.0 through 4.0.3 and 4.1.0; earlier lines fall outside the advisory.
0
Known in-the-wild exploits
Not in CISA's Known Exploited Vulnerabilities catalog; no public exploit code tracked as of 20 November.

Voices

Curated perspectives — historical figures and your fellow readers.

Sign up to generate historical perspectives on this story.

People Involved

Organizations Involved

Timeline

5 events Latest: Today
Tap a bar to jump to that date
  1. Patch approved across OpenSSL branches

    Today Patch

    Pull request #33652 carries an approval and branch labels for master, 4.0 and 4.1, with merge commit 7831b47 recorded.

  2. Ubuntu opens tracking, marks its current release needs evaluation

    Distribution

    Ubuntu's security team publishes a CVE page for the overflow, listing OpenSSL in its 26.10 development release as needing evaluation.

  3. CVE-2026-121481 published at CVSS 9.8

    Advisory

    The National Vulnerability Database and the GitHub Advisory Database rate the overflow critical: network vector, low complexity, high impact on confidentiality and integrity.

  4. Reviewers object; patch switches to an assertion

    Review

    Warnings that callers would inherit new error handling lead the author to use OPENSSL_assert for previously undefined inputs, keeping the fix narrow.

  5. Fix opened for the base64 overflow

    Patch

    Pull request #33652 proposes returning -1 when EVP_EncodeBlock gets null buffers, negative lengths, or an output size that overflows an int.

Scenarios

1

No Exploit Appears and the 9.8 Score Draws a Second Look

Likely Resolves by May 31, 2027

Discussed by: Commenters on Hacker News, including userbinator and amluto

The overflow needs an input near two gigabytes before the size arithmetic breaks. If no application reads an attacker-supplied blob that large and hands it to this function, nothing happens, and the story turns into an argument about how scoring systems treat reachable-but-unlikely bugs.

2

A Service That Base64-Encodes Attacker Inputs Is Exploited

Unlikely Resolves by Nov 19, 2027

Discussed by: Security researchers and the patch author's own writeup

The vulnerable path is a program that reads a very large untrusted blob into memory and encodes it in one call. The OpenSSL command-line tool has been floated as one reachable route, through an oversized proxy password passed by environment variable. A confirmed in-the-wild case would turn a scoring argument into incident response.

3

OpenSSL Deprecates EVP_EncodeBlock for a Length-Checked Replacement

Uncertain Resolves by Nov 19, 2027

Discussed by: esyr in the pull request review

A reviewer's proposal to retire the function and add an explicit-length variant was held out of the CVE patch as out of scope. If it returns as a separate change, callers would hand in their buffer size and this overflow would stop being possible through that call.

Historical Context

3 moments from history that rhyme with this story — and how they unfolded.

April 2014

Heartbleed (2014)

A missing bounds check in OpenSSL's TLS heartbeat extension let a remote client read up to 64 kilobytes of server memory per request. The bug had sat in the code for about two years before it was disclosed.

Then

Major sites patched within days and told users to change passwords.

Now

Google forked BoringSSL and OpenBSD forked LibreSSL; OpenSSL's funding and code-review practices were overhauled.

Why this matters now

Heartbleed is the benchmark every OpenSSL vulnerability is measured against, and the reason a 9.8 score draws immediate attention and immediate skepticism.

February 2021

CVE-2021-23840 (2021)

An integer overflow in OpenSSL's EVP encryption update functions let certain length values overflow internal arithmetic, with the potential to write past a buffer. Fixes shipped in the 1.1.1 and 1.0.2 series.

Then

Distributions pushed patched packages through routine security updates.

Now

It became the reference case for length arithmetic that fails at the top of the integer range.

Why this matters now

The patch author cites it as the same pattern of bug: length math that breaks only when inputs approach the integer limit.

December 2021

Log4Shell (2021)

A lookup feature in the Log4j logging library let an attacker-controlled string trigger a remote class load. It was rated CVSS 10.0 and reachable in default configurations.

Then

Exploit code circulated within hours of disclosure; organizations spent the holidays patching.

Now

CISA launched its Known Exploited Vulnerabilities catalog that November, making active exploitation the trigger for mandated action.

Why this matters now

Log4Shell is the counterexample: a top score attached to a bug reachable by default. CVE-2026-121481 shares the score, not the reachability.

Sources

(6)