# CVE-2026-121481: Integer Overflow in EVP\_EncodeBlock() with Very Large Input Lengths

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.59% (percentile 50, 2026-12-02)
- **CWE:** CWE-190
- **Published:** 2026-11-18T11:43:33.634Z
- **Modified:** 2026-11-30T17:19:14.849Z

## Who should check

- Anyone running OpenSSL \>= 4.1.0, \< 4.1.1; \>= 4.0.0, \< 4.0.4

## Description

Issue summary: 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.

Impact summary: No path by which an attacker can trigger this has been
identified. An application that passes an input length near INT\_MAX to
EVP\_EncodeBlock() could suffer a heap buffer overflow, crashing or corrupting
its own memory, but it must itself supply such a length.

CWE: CWE-190: Integer Overflow or Wraparound

Description: EVP\_EncodeBlock() base64-encodes a buffer of a caller-supplied
length into an output buffer that the caller allocates. The caller is expected
to reserve 4\*((len+2)/3)+1 bytes. For input lengths close to INT\_MAX, the
arithmetic that computes the encoded length overflows a signed integer, so the
function writes more data than the documented output size. The result is a
heap buffer overflow in the calling process.

Reaching this requires an application to pass an input length near INT\_MAX to
EVP\_EncodeBlock(). OpenSSL's TLS, QUIC and CMS implementations never encode
buffers of that size, and the command line tools cannot practically be made to
do so: the limits on reading a proxy password from a file and on bignum sizes
prevent it. An application that accepts an attacker-controlled length and
forwards it to EVP\_EncodeBlock() without its own bound check is exposed.

The severity is Low because no attacker-controlled path to the overflow is
known. The caller must already hold a buffer of about two gigabytes before the
defect can be reached.

FIPS impact: no
The affected code is outside the FIPS module boundary.

## Affected and fixed versions

- OpenSSL: \>= 4.1.0, \< 4.1.1; \>= 4.0.0, \< 4.0.4 (cvelist)

## Technologies

OpenSSL

## Mitigation

- Upgrade OpenSSL to 4.0.4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-121481. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-121481.md
Affected: OpenSSL >= 4.1.0, < 4.1.1; >= 4.0.0, < 4.0.4
Fixed in: OpenSSL 4.1.1, OpenSSL 4.0.4

Steps:
1. Search this machine and project for OpenSSL: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-121481 being exploited?

There is no confirmed exploitation: CVE-2026-121481 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.59% chance of exploitation in the next 30 days (as of 2026-12-02).

### How serious is CVE-2026-121481?

Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-121481?

OpenSSL \>= 4.1.0, \< 4.1.1; \>= 4.0.0, \< 4.0.4.

### Is there a fix for CVE-2026-121481?

Yes. Fixed in OpenSSL 4.1.1, OpenSSL 4.0.4. Upgrade OpenSSL to 4.0.4 or later.

### How do I check if I'm affected by CVE-2026-121481?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://github.com/openssl/openssl/pull/33652>
- other: <https://news.ycombinator.com/item?id=50569226>
- other: <http://www.openwall.com/lists/oss-security/2026/11/24/18>
- other: <http://www.openwall.com/lists/oss-security/2026/11/25/3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-121481>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-121481> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-121481>
